Write final stats.json on exit

This commit is contained in:
Oliver Jowett 2021-02-04 16:36:13 +08:00
parent 6a11387861
commit d1fc00a273
1 changed files with 3 additions and 2 deletions

View File

@ -803,9 +803,10 @@ int main(int argc, char **argv) {
interactiveCleanup();
// If --stats was given, print final statistics
// Write final stats
flush_stats(0);
writeJsonToFile("stats.json", generateStatsJson);
if (Modes.stats) {
flush_stats(0);
display_stats(&Modes.stats_alltime);
}