@Test
public void intrinsics() throws Exception {
runner.forBenchmark(ArrayListGrowthBenchmark.class)
.instrument("allocation")
.run();
Trial trial = Iterables.getOnlyElement(runner.trials());
ImmutableListMultimap<String, Measurement> measurementsByDescription =
Measurement.indexByDescription(trial.measurements());
// 14 objects and 1960 bytes are the known values for growing an ArrayList from 1 element to 100
// elements
for (Measurement objectMeasurement : measurementsByDescription.get("objects")) {
assertEquals(14.0, objectMeasurement.value().magnitude() / objectMeasurement.weight(), 0.001);
}