@Override public String toString() { return Objects.toStringHelper("") .add("instrument", instrumentation.instrument()) .add("benchmarkMethod", instrumentation.benchmarkMethod.getName()) .add("vm", vm.name) .add("parameters", userParameters) .toString(); } }
@Override public String toString() { return MoreObjects.toStringHelper("") .add("instrument", instrumentation.instrument()) .add("benchmarkMethod", instrumentation.benchmarkMethod.getName()) .add("vm", vm.name) .add("parameters", userParameters) .toString(); } }
@Override public final boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof Instrumentation) { Instrumentation that = (Instrumentation) obj; return Instrument.this.equals(that.instrument()) && this.benchmarkMethod.equals(that.benchmarkMethod); } return super.equals(obj); }
Instrument instrument = instrumentation.instrument(); ImmutableList.Builder<String> parameterClassNames = ImmutableList.builder(); for (Class<?> parameterType : instrumentation.benchmarkMethod.getParameterTypes()) {
Instrument instrument = instrumentation.instrument(); WorkerSpec request = new WorkerSpec( trialId,
@Override public TrialResult newTrialResult( VmDataCollectingVisitor dataCollectingVisitor, MeasurementCollectingVisitor measurementCollectingVisitor) { checkState(measurementCollectingVisitor.isDoneCollecting()); // TODO(lukes): should the trial messages be part of the Trial datastructure? It seems like // the web UI could make use of them. return new TrialResult( new Trial.Builder(trialId) .run(run) .instrumentSpec(experiment.instrumentation().instrument().getSpec()) .scenario(new Scenario.Builder() .host(host) .vmSpec(dataCollectingVisitor.vmSpec()) .benchmarkSpec(benchmarkSpec)) .addAllMeasurements(measurementCollectingVisitor.getMeasurements()) .build(), experiment, measurementCollectingVisitor.getMessages()); } };
@Override public Trial newTrial(VmDataCollectingVisitor dataCollectingVisitor, MeasurementCollectingVisitor measurementCollectingVisitor) { checkState(measurementCollectingVisitor.isDoneCollecting()); return new Trial.Builder(trialId) .run(run) .instrumentSpec(experiment.instrumentation().instrument().getSpec()) .scenario(new Scenario.Builder() .host(host) .vmSpec(dataCollectingVisitor.vmSpec()) .benchmarkSpec(benchmarkSpec)) .addAllMeasurements(measurementCollectingVisitor.getMeasurements()) .build(); } };
@Override public Instrument apply(Instrumentation input) { return input.instrument(); } })
@Override public Instrument apply(Instrumentation input) { return input.instrument(); } })
@Override public final boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof Instrumentation) { Instrumentation that = (Instrumentation) obj; return Instrument.this.equals(that.instrument()) && this.benchmarkMethod.equals(that.benchmarkMethod); } return super.equals(obj); }
@Provides @TrialScoped TrialSchedulingPolicy provideTrialSchedulingPolicy(Experiment experiment) { return experiment.instrumentation().instrument().schedulingPolicy(); }