1/*
2 * Copyright (C) 2015 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.google.caliper.runner;
18
19import com.google.caliper.bridge.BridgeModule;
20import com.google.caliper.config.CaliperConfig;
21import com.google.caliper.config.ConfigModule;
22import com.google.caliper.json.GsonModule;
23import com.google.caliper.options.CaliperOptions;
24import com.google.caliper.options.OptionsModule;
25import com.google.caliper.util.OutputModule;
26import com.google.common.util.concurrent.ServiceManager;
27
28import dagger.Component;
29
30import javax.inject.Singleton;
31
32/**
33 * The main component used when running caliper.
34 */
35@Singleton
36@Component(modules = {
37    BenchmarkClassModule.class,
38    BridgeModule.class,
39    ConfigModule.class,
40    ExperimentingRunnerModule.class,
41    GsonModule.class,
42    MainModule.class,
43    OptionsModule.class,
44    OutputModule.class,
45    PlatformModule.class,
46    RunnerModule.class,
47    ServiceModule.class,
48})
49interface MainComponent {
50
51  BenchmarkClass getBenchmarkClass();
52
53  CaliperConfig getCaliperConfig();
54
55  CaliperOptions getCaliperOptions();
56
57  CaliperRun getCaliperRun();
58
59  ServiceManager getServiceManager();
60
61  TrialScopeComponent newTrialComponent(TrialModule trialModule);
62
63  ExperimentComponent newExperimentComponent(ExperimentModule experimentModule);
64}
65