Package edu.wpi.grip.core.metrics
Class BenchmarkRunner
- java.lang.Object
-
- edu.wpi.grip.core.metrics.BenchmarkRunner
-
public class BenchmarkRunner extends java.lang.Object
Benchmark runner. This runs the pipeline multiple times to collect data about how long each step takes to run.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getRunsRemaining()
Checks how many runs are left in the benchmark.boolean
isRunning()
Checks if this benchmark runner is currently running a benchmark.void
run(int numRuns)
Benchmarks the pipeline.
-
-
-
Method Detail
-
run
public void run(int numRuns)
Benchmarks the pipeline.- Parameters:
numRuns
- the number of runs of the pipeline to collect events from.
-
isRunning
public boolean isRunning()
Checks if this benchmark runner is currently running a benchmark.- Returns:
- true if a benchmark is running, false otherwise
-
getRunsRemaining
public int getRunsRemaining()
Checks how many runs are left in the benchmark. Returns zero if no benchmark is running.- Returns:
- the number of runs left in the benchmark
-
-