BenchmarkSpec benchmarkSpec,
int localPort,
Gson gson,
BenchmarkClass benchmarkClass) {
// TODO(lukes): it would be nice to split this method into a few smaller more targeted methods
Instrumentation instrumentation = experiment.instrumentation();
Instrument instrument = instrumentation.instrument();
ImmutableList.Builder<String> parameterClassNames = ImmutableList.builder();
for (Class<?> parameterType : instrumentation.benchmarkMethod.getParameterTypes()) {
parameterClassNames.add(parameterType.getName());
}
WorkerSpec request = new WorkerSpec(
trialId,
instrumentation.workerClass().getName(),
instrumentation.workerOptions(),
benchmarkSpec,
parameterClassNames.build(),
localPort);
ProcessBuilder processBuilder = new ProcessBuilder().redirectErrorStream(false);