if (Strings.isNullOrEmpty(agentJar)) { try { Optional<File> instrumentJar = findAllocationInstrumentJarOnClasspath();
@Override public Instrumentation createInstrumentation(Method benchmarkMethod) throws InvalidBenchmarkException { checkNotNull(benchmarkMethod); checkArgument(isBenchmarkMethod(benchmarkMethod)); try { switch (BenchmarkMethods.Type.of(benchmarkMethod)) { case MACRO: return new MacroAllocationInstrumentation(benchmarkMethod); case MICRO: case PICO: return new MicroAllocationInstrumentation(benchmarkMethod); default: throw new AssertionError("unknown type"); } } catch (IllegalArgumentException e) { throw new InvalidBenchmarkException("Benchmark methods must have no arguments or accept " + "a single int or long parameter: %s", benchmarkMethod.getName()); } }
@Override public Instrumentation createInstrumentation(Method benchmarkMethod) throws InvalidBenchmarkException { checkNotNull(benchmarkMethod); checkArgument(isBenchmarkMethod(benchmarkMethod)); try { switch (BenchmarkMethods.Type.of(benchmarkMethod)) { case MACRO: return new MacroAllocationInstrumentation(benchmarkMethod); case MICRO: case PICO: return new MicroAllocationInstrumentation(benchmarkMethod); default: throw new AssertionError("unknown type"); } } catch (IllegalArgumentException e) { throw new InvalidBenchmarkException("Benchmark methods must have no arguments or accept " + "a single int or long parameter: %s", benchmarkMethod.getName()); } }
if (Strings.isNullOrEmpty(agentJar)) { try { Optional<File> instrumentJar = findAllocationInstrumentJarOnClasspath();