Package es.ull.pcg.hpc.fancyjcl
Class Benchmark
java.lang.Object
es.ull.pcg.hpc.fancyjcl.Benchmark
Small utility to perform benchmarks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Interface that can be used to pass a lambda to the benchmark. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
perform
(Benchmark.Process process, Benchmark.Process synchronization, int iterations) Performs a benchmark of an asynchronous portion of code and a synchronization code.
-
Constructor Details
-
Benchmark
public Benchmark()
-
-
Method Details
-
perform
public static void perform(Benchmark.Process process, Benchmark.Process synchronization, int iterations) throws Exception Performs a benchmark of an asynchronous portion of code and a synchronization code. This allows for enqueuingiterations
calls to the code to benchmark and perform a single synchronization call.- Parameters:
process
- Code to benchmark.synchronization
- Code to synchronize the `process`iterations
- Number of iterations to perform- Throws:
Exception
- Any failed execution will throw an exception
-