Skip to content

Commit

Permalink
get tick report of last 5s instead of last 15
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 17, 2024
1 parent 044b7b4 commit 57052d7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public double getGlobalTPS() {
Double tps = this.cached_tps.getIfPresent(regionHandle);
if (tps == null) {
// If nothing is cached yet, get tps and add to cache
tps = regionHandle.getTickReport15s(System.nanoTime()).tpsData().segmentAll().average();
tps = regionHandle.getTickReport5s(System.nanoTime()).tpsData().segmentAll().average();
this.cached_tps.put(regionHandle, tps);
}
return tps;
Expand Down Expand Up @@ -117,7 +117,7 @@ public double getTPS(World world, int chunkX, int chunkZ) {
Double tps = this.cached_tps.getIfPresent(regionHandle);
if (tps == null) {
// If nothing is cached yet, get tps and add to cache
tps = regionHandle.getTickReport15s(System.nanoTime()).tpsData().segmentAll().average();
tps = regionHandle.getTickReport5s(System.nanoTime()).tpsData().segmentAll().average();
this.cached_tps.put(regionHandle, tps);
}
atomic_tps.set(tps);
Expand Down

0 comments on commit 57052d7

Please sign in to comment.