/external/caliper/caliper/src/test/java/com/google/caliper/runner/ |
D | RuntimeInstrumentTest.java | 79 Method benchmarkMethod = RuntimeBenchmark.class.getDeclaredMethod("macrobenchmark"); in createInstrumentation_macrobenchmark() local 80 Instrumentation instrumentation = instrument.createInstrumentation(benchmarkMethod); in createInstrumentation_macrobenchmark() 81 assertEquals(benchmarkMethod, instrumentation.benchmarkMethod()); in createInstrumentation_macrobenchmark() 87 Method benchmarkMethod = RuntimeBenchmark.class.getDeclaredMethod("microbenchmark", int.class); in createInstrumentation_microbenchmark() local 88 Instrumentation instrumentation = instrument.createInstrumentation(benchmarkMethod); in createInstrumentation_microbenchmark() 89 assertEquals(benchmarkMethod, instrumentation.benchmarkMethod()); in createInstrumentation_microbenchmark() 95 Method benchmarkMethod = RuntimeBenchmark.class.getDeclaredMethod("picobenchmark", long.class); in createInstrumentation_picobenchmark() local 96 Instrumentation instrumentation = instrument.createInstrumentation(benchmarkMethod); in createInstrumentation_picobenchmark() 97 assertEquals(benchmarkMethod, instrumentation.benchmarkMethod()); in createInstrumentation_picobenchmark() 103 Method benchmarkMethod = in createInstrumentation_badParam() local [all …]
|
D | ExperimentingRunnerModuleTest.java | 127 public Instrumentation createInstrumentation(Method benchmarkMethod) in createInstrumentation() argument 129 return new Instrumentation(benchmarkMethod) { in createInstrumentation()
|
D | BenchmarkClassCheckerTest.java | 37 @Benchmark void benchmarkMethod() {} in benchmarkMethod() method in BenchmarkClassCheckerTest.BenchmarkAnnotatedMethod
|
/external/caliper/caliper/src/main/java/com/google/caliper/runner/ |
D | ExperimentModule.java | 38 private final Method benchmarkMethod; field in ExperimentModule 41 Method benchmarkMethod, in ExperimentModule() argument 44 this.benchmarkMethod = checkNotNull(benchmarkMethod); in ExperimentModule() 48 Method benchmarkMethod = experiment.instrumentation().benchmarkMethod(); in forExperiment() local 50 benchmarkMethod, in forExperiment() 57 Method benchmarkMethod = findBenchmarkMethod(benchmarkClass, spec.benchmarkSpec.methodName(), in forWorkerSpec() local 59 benchmarkMethod.setAccessible(true); in forWorkerSpec() 60 return new ExperimentModule(benchmarkMethod, spec.benchmarkSpec.parameters()); in forWorkerSpec() 72 return benchmarkMethod.getName(); in provideRunningBenchmarkMethodName() 78 return benchmarkMethod; in provideRunningBenchmarkMethod()
|
D | ArbitraryMeasurementInstrument.java | 52 public Instrumentation createInstrumentation(Method benchmarkMethod) in createInstrumentation() argument 54 if (benchmarkMethod.getParameterTypes().length != 0) { in createInstrumentation() 56 "Arbitrary measurement methods should take no parameters: " + benchmarkMethod.getName()); in createInstrumentation() 59 if (benchmarkMethod.getReturnType() != double.class) { in createInstrumentation() 62 + benchmarkMethod.getName()); in createInstrumentation() 66 if (Util.isStatic(benchmarkMethod)) { in createInstrumentation() 68 "Arbitrary measurement methods must not be static: " + benchmarkMethod.getName()); in createInstrumentation() 71 if (!Util.isPublic(benchmarkMethod)) { in createInstrumentation() 73 "Arbitrary measurement methods must be public: " + benchmarkMethod.getName()); in createInstrumentation() 76 return new ArbitraryMeasurementInstrumentation(benchmarkMethod); in createInstrumentation() [all …]
|
D | AllocationInstrument.java | 71 public Instrumentation createInstrumentation(Method benchmarkMethod) in createInstrumentation() argument 73 checkNotNull(benchmarkMethod); in createInstrumentation() 74 checkArgument(isBenchmarkMethod(benchmarkMethod)); in createInstrumentation() 76 switch (BenchmarkMethods.Type.of(benchmarkMethod)) { in createInstrumentation() 78 return new MacroAllocationInstrumentation(benchmarkMethod); in createInstrumentation() 81 return new MicroAllocationInstrumentation(benchmarkMethod); in createInstrumentation() 87 + "a single int or long parameter: %s", benchmarkMethod.getName()); in createInstrumentation() 92 MicroAllocationInstrumentation(Method benchmarkMethod) { in MicroAllocationInstrumentation() argument 93 super(benchmarkMethod); in MicroAllocationInstrumentation() 101 benchmarkMethod.invoke(benchmark, 1); in dryRun() [all …]
|
D | RuntimeInstrument.java | 95 public Instrumentation createInstrumentation(Method benchmarkMethod) in createInstrumentation() argument 97 checkNotNull(benchmarkMethod); in createInstrumentation() 98 checkArgument(isBenchmarkMethod(benchmarkMethod)); in createInstrumentation() 99 if (isStatic(benchmarkMethod)) { in createInstrumentation() 101 benchmarkMethod.getName()); in createInstrumentation() 104 switch (BenchmarkMethods.Type.of(benchmarkMethod)) { in createInstrumentation() 106 return new MacrobenchmarkInstrumentation(benchmarkMethod); in createInstrumentation() 108 return new MicrobenchmarkInstrumentation(benchmarkMethod); in createInstrumentation() 110 return new PicobenchmarkInstrumentation(benchmarkMethod); in createInstrumentation() 116 + "a single int or long parameter: %s", benchmarkMethod.getName()); in createInstrumentation() [all …]
|
D | Instrument.java | 66 public abstract Instrumentation createInstrumentation(Method benchmarkMethod) in createInstrumentation() argument 79 protected Method benchmarkMethod; field in Instrument.Instrumentation 81 protected Instrumentation(Method benchmarkMethod) { in Instrumentation() argument 82 this.benchmarkMethod = checkNotNull(benchmarkMethod); in Instrumentation() 89 Method benchmarkMethod() { in benchmarkMethod() method in Instrument.Instrumentation 90 return benchmarkMethod; in benchmarkMethod() 100 && this.benchmarkMethod.equals(that.benchmarkMethod); in equals() 107 return Objects.hashCode(Instrument.this, benchmarkMethod); in hashCode() 114 .add("benchmarkMethod", benchmarkMethod) in toString()
|
D | BenchmarkMethods.java | 42 static Type of(Method benchmarkMethod) { in of() argument 43 Class<?>[] parameterTypes = benchmarkMethod.getParameterTypes(); in of() 51 throw new IllegalArgumentException("invalid method parameters: " + benchmarkMethod); in of()
|
D | TrialModule.java | 76 .className(experiment.instrumentation().benchmarkMethod().getDeclaringClass().getName()) in provideBenchmarkSpec() 77 .methodName(experiment.instrumentation().benchmarkMethod().getName()) in provideBenchmarkSpec()
|
D | Experiment.java | 77 .add("benchmarkMethod", instrumentation.benchmarkMethod.getName()) in toString()
|
D | WorkerProcess.java | 157 ImmutableList.copyOf(instrumentation.benchmarkMethod.getParameterTypes()), in buildProcess()
|
D | ExperimentingCaliperRun.java | 105 return experiment.instrumentation().benchmarkMethod().getName(); in run()
|
/external/caliper/caliper/src/main/java/com/google/caliper/worker/ |
D | MicrobenchmarkAllocationWorker.java | 69 measureAllocations(benchmark, benchmarkMethod, WARMUP_REPS); in bootstrap() 94 AllocationStats stats = measureAllocations(benchmark, benchmarkMethod, 0); in verifyBenchmarkIsDeterministic() 128 AllocationStats baseline = measureAllocations(benchmark, benchmarkMethod, 0); in measure() 131 AllocationStats measurement = measureAllocations(benchmark, benchmarkMethod, measurementReps); in measure()
|
D | MacrobenchmarkAllocationWorker.java | 44 measureAllocations(benchmark, benchmarkMethod); in bootstrap() 48 return measureAllocations(benchmark, benchmarkMethod).toMeasurements(); in measure()
|
D | Worker.java | 39 protected final Method benchmarkMethod; field in Worker 44 this.benchmarkMethod = method; in Worker()
|
D | RuntimeWorker.java | 117 benchmark.getClass(), benchmarkMethod.getName(), in invokeTimeMethod() 121 benchmarkMethod.invoke(benchmark, intReps); in invokeTimeMethod() 138 benchmarkMethod.invoke(benchmark, reps); in invokeTimeMethod()
|
D | ArbitraryMeasurementWorker.java | 58 double measured = (Double) benchmarkMethod.invoke(benchmark); in measure()
|
D | MacrobenchmarkWorker.java | 69 benchmarkMethod.invoke(benchmark); in measure()
|