コード例 #1
0
 public Collection<InstanceState> getAllInstanceStates() {
   Collection<InstanceState> allInstanceStates = new LinkedList<InstanceState>();
   for (Runner runner : stopper.getRunners()) {
     allInstanceStates.add(runner.getInstanceState());
   }
   return allInstanceStates;
 }
コード例 #2
0
  public void notifyFinished(Runner runner) {
    /* Get results */
    InstanceType instanceType = runner.getInstanceState().getInstanceType();
    Multimap<Benchmark, Result> benchmarkResults = runner.getBenchmarkResults();
    if (benchmarkResults != null)
      resultsForAllBenchmarksForType.put(instanceType, benchmarkResults);

    /* Check if all are done and notify the GUI */
    synchronized (numberOfRunnersDone) {
      if (++numberOfRunnersDone >= stopper.getRunners().size()) {
        setChanged();
        notifyObservers();
      }
    }
  }
コード例 #3
0
  public void prepareBenchmarking(
      List<InstanceType> checkedInstanceTypes, Class<? extends Runner> runnerClass) {
    this.resultsForAllBenchmarksForType.clear();
    this.benchmarks = metricsConfiguration.getSelectedBenchmarks();
    this.numberOfRunnersDone = 0;

    Integer stoppingMethodIndex = stoppingConfiguration.getSelectedStoppingMethodIndex();

    try {
      this.stopper =
          StoppingConfiguration.newInstanceOf(
              stoppingMethodIndex, this, runnerClass, checkedInstanceTypes, benchmarks);
    } catch (InstantiationException
        | IllegalAccessException
        | IllegalArgumentException
        | InvocationTargetException
        | NoSuchMethodException
        | SecurityException e) {
      e.printStackTrace();
    }

    benchmarkingState = new BenchmarkingState(stopper.getRunners());
  }