Skip to content

Commit

Permalink
Trigger GC at the beginning of each benchmark iteration
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Hussein (amahussein) <[email protected]>

Contributes to NVIDIA#1423

Trigger a GC at the beginning of each benchmark iteration
  • Loading branch information
amahussein committed Nov 15, 2024
1 parent 049bcca commit 8ea31fb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class Benchmark(
val gcTimes = ArrayBuffer[Long]()
//For tracking maximum GC over iterations
for (i <- 0 until minIters) {
System.gc() // ensures GC for a consistent state across different iterations
val timer = new ToolsTimer(i)
val memoryTracker = new MemoryMetricsTracker
f(timer)
Expand Down

0 comments on commit 8ea31fb

Please sign in to comment.