@@ -113,6 +113,7 @@ public void exportJSON(Path toDirectory, ServerUUID serverUUID) throws IOExcepti
113113 String datapointType = "datapoint?type=" ;
114114 String after = "&after=" + monthAgo ;
115115 String afterMillis = "&afterMillisAgo=" ;
116+ String beforeMillis = "&beforeMillisAgo=" ;
116117 exportJSON (toDirectory ,
117118 "network/overview" ,
118119 "network/servers" ,
@@ -133,26 +134,48 @@ public void exportJSON(Path toDirectory, ServerUUID serverUUID) throws IOExcepti
133134 "retention" ,
134135 "joinAddresses" ,
135136 "playersTable" ,
136- datapointType + DatapointType .PLAYTIME . name () ,
137- datapointType + DatapointType .PLAYTIME . name () + after ,
138- datapointType + DatapointType .AFK_TIME . name () + after ,
139- datapointType + DatapointType .AFK_TIME_PERCENTAGE . name () + after ,
140- datapointType + DatapointType .SERVER_OCCUPIED . name () + after ,
141- datapointType + DatapointType .MOST_ACTIVE_GAME_MODE . name () + after ,
142- datapointType + DatapointType .WORLD_PIE . name () + after ,
143- datapointType + DatapointType .SERVER_PIE . name () ,
144- datapointType + DatapointType .UNIQUE_PLAYERS . name () + afterMillis + TimeUnit .DAYS .toMillis (30 ),
145- datapointType + DatapointType .UNIQUE_PLAYERS . name () + afterMillis + TimeUnit .DAYS .toMillis (7 ),
146- datapointType + DatapointType .UNIQUE_PLAYERS . name () + afterMillis + TimeUnit .DAYS .toMillis (1 ),
147- datapointType + DatapointType .NEW_PLAYERS . name () ,
148- datapointType + DatapointType .NEW_PLAYERS . name () + afterMillis + TimeUnit .DAYS .toMillis (30 ),
149- datapointType + DatapointType .NEW_PLAYERS . name () + afterMillis + TimeUnit .DAYS .toMillis (7 ),
150- datapointType + DatapointType .NEW_PLAYERS . name () + afterMillis + TimeUnit .DAYS .toMillis (1 ),
151- datapointType + DatapointType .REGULAR_PLAYERS . name () ,
137+ datapointType + DatapointType .PLAYTIME ,
138+ datapointType + DatapointType .PLAYTIME + after ,
139+ datapointType + DatapointType .AFK_TIME + after ,
140+ datapointType + DatapointType .AFK_TIME_PERCENTAGE + after ,
141+ datapointType + DatapointType .SERVER_OCCUPIED + after ,
142+ datapointType + DatapointType .MOST_ACTIVE_GAME_MODE + after ,
143+ datapointType + DatapointType .WORLD_PIE + after ,
144+ datapointType + DatapointType .SERVER_PIE ,
145+ datapointType + DatapointType .UNIQUE_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (30 ),
146+ datapointType + DatapointType .UNIQUE_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (7 ),
147+ datapointType + DatapointType .UNIQUE_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (1 ),
148+ datapointType + DatapointType .NEW_PLAYERS ,
149+ datapointType + DatapointType .NEW_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (30 ),
150+ datapointType + DatapointType .NEW_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (7 ),
151+ datapointType + DatapointType .NEW_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (1 ),
152+ datapointType + DatapointType .REGULAR_PLAYERS ,
152153 datapointType + DatapointType .PLAYERS_ONLINE_PEAK + afterMillis + TimeUnit .DAYS .toMillis (2 ),
153154 datapointType + DatapointType .PLAYERS_ONLINE_PEAK ,
154155 datapointType + DatapointType .SESSION_COUNT ,
155- datapointType + DatapointType .SESSION_COUNT + after
156+ datapointType + DatapointType .SESSION_COUNT + after ,
157+ datapointType + DatapointType .PLAYTIME_PER_PLAYER_AVERAGE ,
158+ datapointType + DatapointType .SESSION_LENGTH_AVERAGE ,
159+ datapointType + DatapointType .PLAYER_KILLS ,
160+ datapointType + DatapointType .MOB_KILLS ,
161+ datapointType + DatapointType .DEATHS ,
162+ // Week comparison
163+ datapointType + DatapointType .UNIQUE_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
164+ datapointType + DatapointType .NEW_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
165+ datapointType + DatapointType .REGULAR_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
166+ datapointType + DatapointType .PLAYTIME_PER_PLAYER_AVERAGE + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
167+ datapointType + DatapointType .SESSION_LENGTH_AVERAGE + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
168+ datapointType + DatapointType .SESSION_COUNT + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
169+ datapointType + DatapointType .PLAYER_KILLS + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
170+ datapointType + DatapointType .MOB_KILLS + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
171+ datapointType + DatapointType .DEATHS + afterMillis + TimeUnit .DAYS .toMillis (14 ) + beforeMillis + TimeUnit .DAYS .toMillis (7L ),
172+ datapointType + DatapointType .REGULAR_PLAYERS + afterMillis + TimeUnit .DAYS .toMillis (7 ),
173+ datapointType + DatapointType .PLAYTIME_PER_PLAYER_AVERAGE + afterMillis + TimeUnit .DAYS .toMillis (7 ),
174+ datapointType + DatapointType .SESSION_LENGTH_AVERAGE + afterMillis + TimeUnit .DAYS .toMillis (7 ),
175+ datapointType + DatapointType .SESSION_COUNT + afterMillis + TimeUnit .DAYS .toMillis (7 ),
176+ datapointType + DatapointType .PLAYER_KILLS + afterMillis + TimeUnit .DAYS .toMillis (7 ),
177+ datapointType + DatapointType .MOB_KILLS + afterMillis + TimeUnit .DAYS .toMillis (7 ),
178+ datapointType + DatapointType .DEATHS + afterMillis + TimeUnit .DAYS .toMillis (7 )
156179 );
157180 }
158181
0 commit comments