server, tests: improved game error and AI logs, added docs, added error stats in load test's result table (related to #11572);

This commit is contained in:
Oleg Agafonov 2024-01-08 23:21:44 +04:00
parent 19e829a959
commit eedb9e6054
5 changed files with 80 additions and 53 deletions

View file

@ -37,6 +37,7 @@ public class GameView implements Serializable {
private static final long serialVersionUID = 1L;
private static final Logger LOGGER = Logger.getLogger(GameView.class);
private final int priorityTime;
private final int bufferTime;
private final List<PlayerView> players = new ArrayList<>();
@ -59,6 +60,7 @@ public class GameView implements Serializable {
private final int turn;
private boolean special = false;
private final boolean rollbackTurnsAllowed;
private int totalErrorsCount;
public GameView(GameState state, Game game, UUID createdForPlayerId, UUID watcherUserId) {
Player createdForPlayer = null;
@ -198,7 +200,8 @@ public class GameView implements Serializable {
} else {
this.special = false;
}
rollbackTurnsAllowed = game.getOptions().rollbackTurnsAllowed;
this.rollbackTurnsAllowed = game.getOptions().rollbackTurnsAllowed;
this.totalErrorsCount = game.getTotalErrorsCount();
}
private void checkPaid(UUID uuid, StackAbility stackAbility) {
@ -331,4 +334,8 @@ public class GameView implements Serializable {
Gson gson = new GsonBuilder().create();
return gson.toJson(this);
}
public int getTotalErrorsCount() {
return this.totalErrorsCount;
}
}