Search in sources :

Example 1 with BenchmarkSuiteModule

use of com.facebook.presto.benchmark.source.BenchmarkSuiteModule 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);
            }
        }
    }
}
Also used : LifeCycleManager(com.facebook.airlift.bootstrap.LifeCycleManager) Injector(com.google.inject.Injector) BenchmarkModule(com.facebook.presto.benchmark.framework.BenchmarkModule) Bootstrap(com.facebook.airlift.bootstrap.Bootstrap) BenchmarkModule(com.facebook.presto.benchmark.framework.BenchmarkModule) BenchmarkSuiteModule(com.facebook.presto.benchmark.source.BenchmarkSuiteModule) Module(com.google.inject.Module) EventClientModule(com.facebook.presto.benchmark.event.EventClientModule) BenchmarkSuiteModule(com.facebook.presto.benchmark.source.BenchmarkSuiteModule) EventClientModule(com.facebook.presto.benchmark.event.EventClientModule)

Aggregations

Bootstrap (com.facebook.airlift.bootstrap.Bootstrap)1 LifeCycleManager (com.facebook.airlift.bootstrap.LifeCycleManager)1 EventClientModule (com.facebook.presto.benchmark.event.EventClientModule)1 BenchmarkModule (com.facebook.presto.benchmark.framework.BenchmarkModule)1 BenchmarkSuiteModule (com.facebook.presto.benchmark.source.BenchmarkSuiteModule)1 Injector (com.google.inject.Injector)1 Module (com.google.inject.Module)1