use of com.facebook.presto.benchmark.framework.BenchmarkModule in project presto by prestodb.
the class AbstractBenchmarkCommand method run.
@Override
public void run() {
Bootstrap app = new Bootstrap(ImmutableList.<Module>builder().add(new BenchmarkSuiteModule(getCustomBenchmarkSuiteSupplierTypes())).add(new BenchmarkModule(getSqlParserOptions(), getParsingOptions(), getExceptionClassifier())).add(new EventClientModule(ImmutableSet.of())).addAll(getAdditionalModules()).build());
Injector injector = null;
try {
injector = app.initialize();
} catch (Exception e) {
throwIfUnchecked(e);
throw new RuntimeException(e);
} finally {
if (injector != null) {
try {
injector.getInstance(LifeCycleManager.class).stop();
} catch (Exception e) {
log.error(e);
}
}
}
}
Aggregations