Package org.apache.commons.math.stat.descriptive

Examples of org.apache.commons.math.stat.descriptive.SynchronizedDescriptiveStatistics


  private long _numDataPoints;
  private long _totalSum;

  public StatCollector()
  {
    _stats = new SynchronizedDescriptiveStatistics();
    _stats.setWindowSize(DEFAULT_WINDOW_SIZE);
  }
View Full Code Here


  private final DescriptiveStatistics _stats;
  private long _numDataPoints;
  private long _totalSum;

  public StatCollector() {
    _stats = new SynchronizedDescriptiveStatistics();
    _stats.setWindowSize(DEFAULT_WINDOW_SIZE);
  }
View Full Code Here

        }
    }


    private DescriptiveStatistics runTest(int concurrencyLevel) throws Exception {
        final SynchronizedDescriptiveStatistics statistics = new SynchronizedDescriptiveStatistics();
        if (concurrencyLevel == 1) {
            // Run test iterations, and capture the execution times
            long runtimeEnd = System.currentTimeMillis() + RUNTIME;
            while (System.currentTimeMillis() < runtimeEnd) {
                statistics.addValue(execute());
            }

        } else {
            List<Executor> threads = new LinkedList<Executor>();
            for (int n=0; n<concurrencyLevel; n++) {
View Full Code Here

        }
    }


    private DescriptiveStatistics runTest(int concurrencyLevel) throws Exception {
        final SynchronizedDescriptiveStatistics statistics = new SynchronizedDescriptiveStatistics();
        if (concurrencyLevel == 1) {
            // Run test iterations, and capture the execution times
            long runtimeEnd = System.currentTimeMillis() + RUNTIME;
            while (System.currentTimeMillis() < runtimeEnd) {
                statistics.addValue(execute());
            }

        } else {
            List<Executor> threads = new LinkedList<Executor>();
            for (int n=0; n<concurrencyLevel; n++) {
View Full Code Here

     * @throws RepositoryException the repository exception
     */
    protected void createLoad(ExecutionContext context) throws RepositoryException {
        // Creates assets for this run

        SynchronizedDescriptiveStatistics writeStats = new SynchronizedDescriptiveStatistics();

        List<Thread> loadThreads = newArrayList();
        for (int idx = 0; idx < LOADERS; idx++) {
            /* Each loader will write to a directory of the form load-idx */
            Thread t =
                    new Thread(getWriter(context, writeStats, idx),
                            "LoadThread-" + idx);
            loadThreads.add(t);
            t.start();
        }

        // wait for the load threads to finish
        for (Thread t : loadThreads) {
            try {
                t.join();
            } catch (InterruptedException e) {
                LOG.error("Exception waiting for join ", e);
            }
        }
       
        LOG.info("Write stats");
        LOG.info(String.format(
            "# min     10%%     50%%     90%%     max       N%n"));
        LOG.info(String.format(
            "%6.0f  %6.0f  %6.0f  %6.0f  %6.0f  %6d%n",
            writeStats.getMin(),
            writeStats.getPercentile(10.0),
            writeStats.getPercentile(50.0),
            writeStats.getPercentile(90.0),
            writeStats.getMax(),
            writeStats.getN()));
    }
View Full Code Here

                "No Benchmarks configured");

        for (String key : benchmarks.keySet()) {
            ScalabilityBenchmark benchmark = benchmarks.get(key);
            if (result.getBenchmarkStatistics(benchmark) == null) {
                result.addBenchmarkStatistics(benchmark, new SynchronizedDescriptiveStatistics());
            }

            Stopwatch watch = Stopwatch.createStarted();

            executeBenchmark(benchmark, context);
View Full Code Here

  private long _numDataPoints;
  private long _totalSum;

  public StatCollector()
  {
    _stats = new SynchronizedDescriptiveStatistics();
    _stats.setWindowSize(DEFAULT_WINDOW_SIZE);
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.stat.descriptive.SynchronizedDescriptiveStatistics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.