/** * Returns a copy of this SynchronizedDescriptiveStatistics instance with the * same internal state. * * @return a copy of this */ @Override public synchronized SynchronizedDescriptiveStatistics copy() { SynchronizedDescriptiveStatistics result = new SynchronizedDescriptiveStatistics(); copy(this, result); return result; }
SynchronizedDescriptiveStatistics writeStats = new SynchronizedDescriptiveStatistics(); 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()));
public StatCollector() { _stats = new SynchronizedDescriptiveStatistics(); _stats.setWindowSize(DEFAULT_WINDOW_SIZE); }
private DescriptiveStatistics runTest(int concurrencyLevel) throws Exception { final SynchronizedDescriptiveStatistics statistics = new SynchronizedDescriptiveStatistics(); if (concurrencyLevel == 1) { statistics.addValue(execute());
/** * A copy constructor. Creates a deep-copy of the {@code original}. * * @param original the {@code SynchronizedDescriptiveStatistics} instance to copy */ public SynchronizedDescriptiveStatistics(SynchronizedDescriptiveStatistics original) { copy(original, this); }
public void stop() { watch.stop(); stats.addValue(watch.elapsed(TimeUnit.MILLISECONDS)); watch.reset(); } }
public StatCollector() { _stats = new SynchronizedDescriptiveStatistics(); _stats.setWindowSize(DEFAULT_WINDOW_SIZE); }
/** * A copy constructor. Creates a deep-copy of the {@code original}. * * @param original the {@code SynchronizedDescriptiveStatistics} instance to copy */ public SynchronizedDescriptiveStatistics(SynchronizedDescriptiveStatistics original) { copy(original, this); }
@Override public void run() { try { int count = 0; while (count < maxAssets) { session.refresh(false); List<String> levels = Lists.newArrayList(); getParentLevels(count, maxAssets, levels); String fileNamePrefix = getFileNamePrefix(levels); String parentDir = getParentSuffix(levels); Stopwatch watch = Stopwatch.createStarted(); Node file = putFile(fileNamePrefix, parentDir); session.save(); if (stats != null) { stats.addValue(watch.elapsed(TimeUnit.MILLISECONDS)); } // record for searching and reading addReadPath(file.getPath()); addSearchPath(fileNamePrefix); if (LOG.isDebugEnabled() && (count + 1) % 1000 == 0) { LOG.debug("Thread " + id + " - Added assets : " + (count + 1)); } count++; } } catch (Exception e) { LOG.error("Exception in load creation ", e); } }
/** * Runs the iteration of the benchmarks added. * * @param context the execution context * @throws Exception */ private void runIteration(ExecutionContext context) throws Exception { Preconditions.checkArgument(benchmarks != null && !benchmarks.isEmpty(), "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); watch.stop(); result.getBenchmarkStatistics(benchmark).addValue(watch.elapsed(TimeUnit.MILLISECONDS)); if (LOG.isDebugEnabled()) { LOG.debug("Execution time for " + benchmark + "-" + watch.elapsed(TimeUnit.MILLISECONDS)); } } }
/** * Returns a copy of this SynchronizedDescriptiveStatistics instance with the * same internal state. * * @return a copy of this */ @Override public synchronized SynchronizedDescriptiveStatistics copy() { SynchronizedDescriptiveStatistics result = new SynchronizedDescriptiveStatistics(); copy(this, result); return result; }
String line; int i = 0; DescriptiveStatistics stats = new SynchronizedDescriptiveStatistics(); stats.setWindowSize(dperiods); File f = new File("");