Tabnine Logo
SynchronizedDescriptiveStatistics
Code IndexAdd Tabnine to your IDE (free)

How to use
SynchronizedDescriptiveStatistics
in
org.apache.commons.math.stat.descriptive

Best Java code snippets using org.apache.commons.math.stat.descriptive.SynchronizedDescriptiveStatistics (Showing top 12 results out of 315)

origin: org.apache.commons/commons-math

/**
 * 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;
}
origin: apache/jackrabbit-oak

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()));
origin: apache/helix

public StatCollector() {
 _stats = new SynchronizedDescriptiveStatistics();
 _stats.setWindowSize(DEFAULT_WINDOW_SIZE);
}
origin: apache/jackrabbit-oak

private DescriptiveStatistics runTest(int concurrencyLevel) throws Exception {
  final SynchronizedDescriptiveStatistics statistics = new SynchronizedDescriptiveStatistics();
  if (concurrencyLevel == 1) {
      statistics.addValue(execute());
origin: org.apache.commons/commons-math

/**
 * 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);
}
origin: apache/jackrabbit-oak

  public void stop() {
    watch.stop();
    stats.addValue(watch.elapsed(TimeUnit.MILLISECONDS));
    watch.reset();
  }
}
origin: org.apache.helix/helix-core

public StatCollector() {
 _stats = new SynchronizedDescriptiveStatistics();
 _stats.setWindowSize(DEFAULT_WINDOW_SIZE);
}
origin: org.apache.commons/math

/**
 * 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);
}
origin: apache/jackrabbit-oak

@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);
  }
}
origin: apache/jackrabbit-oak

/**
 * 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));
    }
  }
}
origin: org.apache.commons/math

/**
 * 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;
}
origin: stackoverflow.com

String line;
int i = 0;
DescriptiveStatistics stats = new SynchronizedDescriptiveStatistics();
stats.setWindowSize(dperiods);
File f = new File("");
org.apache.commons.math.stat.descriptiveSynchronizedDescriptiveStatistics

Javadoc

Implementation of org.apache.commons.math.stat.descriptive.DescriptiveStatistics that is safe to use in a multithreaded environment. Multiple threads can safely operate on a single instance without causing runtime exceptions due to race conditions. In effect, this implementation makes modification and access methods atomic operations for a single instance. That is to say, as one thread is computing a statistic from the instance, no other thread can modify the instance nor compute another statistic.

Most used methods

  • <init>
    A copy constructor. Creates a deep-copy of the original.
  • copy
    Copies source to dest.Neither source nor dest can be null. Acquires synchronization lock on source,
  • addValue
  • getMax
  • getMin
  • getN
  • getPercentile

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now