OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:benchmarkMethod
(Results
1 - 19
of
19
) sorted by null
/external/caliper/caliper/src/main/java/com/google/caliper/runner/
ExperimentModule.java
20
import static com.google.caliper.runner.Running.
BenchmarkMethod
;
38
private final Method
benchmarkMethod
;
41
Method
benchmarkMethod
,
44
this.
benchmarkMethod
= checkNotNull(
benchmarkMethod
);
48
Method
benchmarkMethod
= experiment.instrumentation().
benchmarkMethod
();
50
benchmarkMethod
,
57
Method
benchmarkMethod
= findBenchmarkMethod(benchmarkClass, spec.benchmarkSpec.methodName(),
59
benchmarkMethod
.setAccessible(true)
[
all
...]
ArbitraryMeasurementInstrument.java
52
public Instrumentation createInstrumentation(Method
benchmarkMethod
)
54
if (
benchmarkMethod
.getParameterTypes().length != 0) {
56
"Arbitrary measurement methods should take no parameters: " +
benchmarkMethod
.getName());
59
if (
benchmarkMethod
.getReturnType() != double.class) {
62
+
benchmarkMethod
.getName());
66
if (Util.isStatic(
benchmarkMethod
)) {
68
"Arbitrary measurement methods must not be static: " +
benchmarkMethod
.getName());
71
if (!Util.isPublic(
benchmarkMethod
)) {
73
"Arbitrary measurement methods must be public: " +
benchmarkMethod
.getName());
76
return new ArbitraryMeasurementInstrumentation(
benchmarkMethod
);
[
all
...]
AllocationInstrument.java
71
public Instrumentation createInstrumentation(Method
benchmarkMethod
)
73
checkNotNull(
benchmarkMethod
);
74
checkArgument(isBenchmarkMethod(
benchmarkMethod
));
76
switch (BenchmarkMethods.Type.of(
benchmarkMethod
)) {
78
return new MacroAllocationInstrumentation(
benchmarkMethod
);
81
return new MicroAllocationInstrumentation(
benchmarkMethod
);
87
+ "a single int or long parameter: %s",
benchmarkMethod
.getName());
92
MicroAllocationInstrumentation(Method
benchmarkMethod
) {
93
super(
benchmarkMethod
);
101
benchmarkMethod
.invoke(benchmark, 1)
[
all
...]
BenchmarkMethods.java
42
static Type of(Method
benchmarkMethod
) {
43
Class<?>[] parameterTypes =
benchmarkMethod
.getParameterTypes();
51
throw new IllegalArgumentException("invalid method parameters: " +
benchmarkMethod
);
RuntimeInstrument.java
95
public Instrumentation createInstrumentation(Method
benchmarkMethod
)
97
checkNotNull(
benchmarkMethod
);
98
checkArgument(isBenchmarkMethod(
benchmarkMethod
));
99
if (isStatic(
benchmarkMethod
)) {
101
benchmarkMethod
.getName());
104
switch (BenchmarkMethods.Type.of(
benchmarkMethod
)) {
106
return new MacrobenchmarkInstrumentation(
benchmarkMethod
);
108
return new MicrobenchmarkInstrumentation(
benchmarkMethod
);
110
return new PicobenchmarkInstrumentation(
benchmarkMethod
);
116
+ "a single int or long parameter: %s",
benchmarkMethod
.getName())
[
all
...]
Instrument.java
66
public abstract Instrumentation createInstrumentation(Method
benchmarkMethod
)
79
protected Method
benchmarkMethod
;
81
protected Instrumentation(Method
benchmarkMethod
) {
82
this.
benchmarkMethod
= checkNotNull(
benchmarkMethod
);
89
Method
benchmarkMethod
() {
90
return
benchmarkMethod
;
100
&& this.
benchmarkMethod
.equals(that.
benchmarkMethod
);
107
return Objects.hashCode(Instrument.this,
benchmarkMethod
);
[
all
...]
Experiment.java
77
.add("
benchmarkMethod
", instrumentation.
benchmarkMethod
.getName())
TrialModule.java
76
.className(experiment.instrumentation().
benchmarkMethod
().getDeclaringClass().getName())
77
.methodName(experiment.instrumentation().
benchmarkMethod
().getName())
WorkerProcess.java
157
ImmutableList.copyOf(instrumentation.
benchmarkMethod
.getParameterTypes()),
ExperimentingCaliperRun.java
105
return experiment.instrumentation().
benchmarkMethod
().getName();
/external/caliper/caliper/src/test/java/com/google/caliper/runner/
RuntimeInstrumentTest.java
79
Method
benchmarkMethod
= RuntimeBenchmark.class.getDeclaredMethod("macrobenchmark");
80
Instrumentation instrumentation = instrument.createInstrumentation(
benchmarkMethod
);
81
assertEquals(
benchmarkMethod
, instrumentation.
benchmarkMethod
());
87
Method
benchmarkMethod
= RuntimeBenchmark.class.getDeclaredMethod("microbenchmark", int.class);
88
Instrumentation instrumentation = instrument.createInstrumentation(
benchmarkMethod
);
89
assertEquals(
benchmarkMethod
, instrumentation.
benchmarkMethod
());
95
Method
benchmarkMethod
= RuntimeBenchmark.class.getDeclaredMethod("picobenchmark", long.class);
96
Instrumentation instrumentation = instrument.createInstrumentation(
benchmarkMethod
);
[
all
...]
BenchmarkClassCheckerTest.java
37
@Benchmark void
benchmarkMethod
() {}
ExperimentingRunnerModuleTest.java
127
public Instrumentation createInstrumentation(Method
benchmarkMethod
)
129
return new Instrumentation(
benchmarkMethod
) {
/external/caliper/caliper/src/main/java/com/google/caliper/worker/
MacrobenchmarkAllocationWorker.java
21
import com.google.caliper.runner.Running.
BenchmarkMethod
;
37
@
BenchmarkMethod
Method method, AllocationRecorder recorder) {
44
measureAllocations(benchmark,
benchmarkMethod
);
48
return measureAllocations(benchmark,
benchmarkMethod
).toMeasurements();
MicrobenchmarkAllocationWorker.java
21
import com.google.caliper.runner.Running.
BenchmarkMethod
;
58
@
BenchmarkMethod
Method method, AllocationRecorder recorder, Random random) {
69
measureAllocations(benchmark,
benchmarkMethod
, WARMUP_REPS);
94
AllocationStats stats = measureAllocations(benchmark,
benchmarkMethod
, 0);
128
AllocationStats baseline = measureAllocations(benchmark,
benchmarkMethod
, 0);
131
AllocationStats measurement = measureAllocations(benchmark,
benchmarkMethod
, measurementReps);
Worker.java
39
protected final Method
benchmarkMethod
;
44
this.
benchmarkMethod
= method;
RuntimeWorker.java
25
import com.google.caliper.runner.Running.
BenchmarkMethod
;
105
@
BenchmarkMethod
Method method, Random random, Ticker ticker,
117
benchmark.getClass(),
benchmarkMethod
.getName(),
121
benchmarkMethod
.invoke(benchmark, intReps);
131
@
BenchmarkMethod
Method method, Random random, Ticker ticker,
138
benchmarkMethod
.invoke(benchmark, reps);
ArbitraryMeasurementWorker.java
23
import com.google.caliper.runner.Running.
BenchmarkMethod
;
42
@
BenchmarkMethod
Method method,
58
double measured = (Double)
benchmarkMethod
.invoke(benchmark);
MacrobenchmarkWorker.java
27
import com.google.caliper.runner.Running.
BenchmarkMethod
;
47
@Inject MacrobenchmarkWorker(@Benchmark Object benchmark, @
BenchmarkMethod
Method method,
69
benchmarkMethod
.invoke(benchmark);
Completed in 132 milliseconds