Commit 31f317c3 authored by Noric Couderc's avatar Noric Couderc

Added test for checking benchmark IDs

We check that the ids are indeed different if we generate
two benchmarks correctly
parent a3647ead
......@@ -459,5 +459,33 @@ public class SyntheticBenchmarkTest {
Assert.assertEquals(expected, bench.methodNormalizedHistogram());
}
@Test
public void testTraceBenchmarkIdentifier() {
List<String> trace1 = List.of(
"runAdd",
"runAdd",
"runGet"
);
BCBenchmarkPackage<List<Object>> bench = BCBenchmarkPackage.LIST(
"Trace1",
trace1,
new ArrayList<>());
List<String> trace2 = List.of(
"runAdd",
"runGet",
"runAdd"
);
BCBenchmarkPackage<List<Object>> bench2 = BCBenchmarkPackage.LIST(
"Trace2",
trace2,
new ArrayList<>());
// The IDs are the same if you use the same trace key!
Assert.assertNotEquals(bench.getBenchmarkIdentifier(), bench2.getBenchmarkIdentifier());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment