Skip to content

Commit

Permalink
Reverse order of measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Jan 5, 2025
1 parent 118eef0 commit b72091f
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ public void runTest() {
}
}

measureTransferCacheComputation();

updateTimersWithGlobalCounters();

timeTransferCacheComputation();
timer.finishUp();

printProfileStatistics();
saveTestCasesToResultFile();
Expand Down Expand Up @@ -340,7 +342,11 @@ private void saveTestCasesToResultFile() {
}
}

private void timeTransferCacheComputation() {
/**
* Measure how long it takes to compute the transfer cache.
*/
private void measureTransferCacheComputation() {
System.out.println("Measuring transfer cache computation");
IntStream
.of(1, 2, 3, 4, 5, 6, 7)
.forEach(reluctance -> {
Expand Down Expand Up @@ -370,7 +376,6 @@ private void updateTimersWithGlobalCounters() {
timer.globalCount("jvm_max_memory", runtime.maxMemory());
timer.globalCount("jvm_total_memory", runtime.totalMemory());
timer.globalCount("jvm_used_memory", runtime.totalMemory() - runtime.freeMemory());
timer.finishUp();
}

/**
Expand Down

0 comments on commit b72091f

Please sign in to comment.