make metrics methods agree in tense
This commit is contained in:
parent
45690c1914
commit
a0d21cd2fd
|
@ -135,7 +135,7 @@ public class StartupUtils extends GuiceServletContextListener {
|
|||
CardcastService.hackSslVerifier();
|
||||
|
||||
// log that the server (re-)started to metrics logging (to flush all old games and users)
|
||||
injector.getInstance(Metrics.class).serverStarted(
|
||||
injector.getInstance(Metrics.class).serverStart(
|
||||
injector.getInstance(Key.get(String.class, UniqueId.class)));
|
||||
}
|
||||
|
||||
|
|
|
@ -1512,7 +1512,7 @@ public class Game {
|
|||
rescheduleTimer(task, ROUND_INTERMISSION);
|
||||
}
|
||||
|
||||
metrics.roundJudged(currentUniqueId, user.getSessionId(), cardPlayer.getUser().getSessionId(),
|
||||
metrics.roundComplete(currentUniqueId, user.getSessionId(), cardPlayer.getUser().getSessionId(),
|
||||
playedCards.cardsByUser());
|
||||
|
||||
return null;
|
||||
|
|
|
@ -48,7 +48,7 @@ public class KafkaMetrics implements Metrics {
|
|||
private static final Logger LOG = Logger.getLogger(KafkaMetrics.class);
|
||||
|
||||
@Override
|
||||
public void serverStarted(final String startupId) {
|
||||
public void serverStart(final String startupId) {
|
||||
LOG.trace(String.format("serverStarted(%s)", startupId));
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class KafkaMetrics implements Metrics {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void roundJudged(final String gameId, final String judgeSessionId,
|
||||
public void roundComplete(final String gameId, final String judgeSessionId,
|
||||
final String winnerSessionId,
|
||||
final Map<User, List<WhiteCard>> cards) {
|
||||
LOG.trace(String.format("roundJudged(%s, %s, %s, %s)", gameId, judgeSessionId, winnerSessionId,
|
||||
|
|
|
@ -42,7 +42,7 @@ import com.maxmind.geoip2.model.CityResponse;
|
|||
* @author Andy Janata (ajanata@socialgamer.net)
|
||||
*/
|
||||
public interface Metrics {
|
||||
void serverStarted(String startupId);
|
||||
void serverStart(String startupId);
|
||||
|
||||
void newUser(String persistentId, String sessionId, @Nullable CityResponse geoIp,
|
||||
String agentName, String agentType, String agentOs, String agentLanguage);
|
||||
|
@ -51,7 +51,7 @@ public interface Metrics {
|
|||
|
||||
// The card data is way too complicated to dictate the format it should be in, so let
|
||||
// implementations deal with the structured data.
|
||||
void roundJudged(String gameId, String judgeSessionId, String winnerSessionId,
|
||||
void roundComplete(String gameId, String judgeSessionId, String winnerSessionId,
|
||||
Map<User, List<WhiteCard>> cards);
|
||||
|
||||
void gameStart(String gameId, Collection<CardSet> decks, int blanks, int maxPlayers,
|
||||
|
|
|
@ -48,7 +48,7 @@ public class NoOpMetrics implements Metrics {
|
|||
private static final Logger LOG = Logger.getLogger(NoOpMetrics.class);
|
||||
|
||||
@Override
|
||||
public void serverStarted(final String startupId) {
|
||||
public void serverStart(final String startupId) {
|
||||
LOG.trace(String.format("serverStarted(%s)", startupId));
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class NoOpMetrics implements Metrics {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void roundJudged(final String gameId, final String judgeSessionId,
|
||||
public void roundComplete(final String gameId, final String judgeSessionId,
|
||||
final String winnerSessionId,
|
||||
final Map<User, List<WhiteCard>> cards) {
|
||||
LOG.trace(String.format("roundJudged(%s, %s, %s, %s)", gameId, judgeSessionId, winnerSessionId,
|
||||
|
|
Loading…
Reference in New Issue