Package org.prevayler.foundation

Examples of org.prevayler.foundation.StopWatch


  /**
   * @return The number of operations the test managed to execute per second with the given number of threads.
   */
  private double performRound(int threads) {
    long initialOperationCount = operationCount;
    StopWatch stopWatch = StopWatch.start();

    startThreads(threads);
    sleep();
    stopThreads();

    double secondsEllapsed = stopWatch.secondsEllapsed();
    double operationsPerSecond = (operationCount - initialOperationCount) / secondsEllapsed;

    out("\nMemory used: " + Runtime.getRuntime().totalMemory());
    subject.reportResourcesUsed(System.out);
    out("Seconds ellapsed: " + secondsEllapsed);
View Full Code Here

TOP

Related Classes of org.prevayler.foundation.StopWatch

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.