Package ch.qos.logback.core.contention

Examples of ch.qos.logback.core.contention.ThreadedThroughputCalculator


  static int THREAD_COUNT = 3;
  static long OVERALL_DURATION_IN_MILLIS = 2000;

  public static void main(String args[]) throws InterruptedException {

    ThreadedThroughputCalculator tp = new ThreadedThroughputCalculator(
        OVERALL_DURATION_IN_MILLIS);
    tp.printEnvironmentInfo("NoLockThroughput");

    for (int i = 0; i < 2; i++) {
      tp.execute(buildArray(LockingModel.NOLOCK));
    }

    tp.execute(buildArray(LockingModel.NOLOCK));
    tp.printThroughput("No lock:   ", true);
  }
View Full Code Here


  static int THREAD_COUNT = 10;
  static long OVERALL_DURATION_IN_MILLIS = 5000;

  public static void main(String args[]) throws InterruptedException {

    ThreadedThroughputCalculator tp = new ThreadedThroughputCalculator(
        OVERALL_DURATION_IN_MILLIS);
    tp.printEnvironmentInfo("LockThroughput");

    for (int i = 0; i < 2; i++) {
      tp.execute(buildArray(LockingModel.SYNC));
      tp.execute(buildArray(LockingModel.UNFAIR));
      tp.execute(buildArray(LockingModel.FAIR));
    }
   
    tp.execute(buildArray(LockingModel.SYNC));
    tp.printThroughput("Sync:   ");

    tp.execute(buildArray(LockingModel.UNFAIR));
    tp.printThroughput("Unfair: ");

    tp.execute(buildArray(LockingModel.FAIR));
    tp.printThroughput("Fair:   ");
  }
View Full Code Here

  static int THREAD_COUNT = 16;
  static long OVERALL_DURATION_IN_MILLIS = 3000;

  public static void main(String args[]) throws InterruptedException {

    ThreadedThroughputCalculator tp = new ThreadedThroughputCalculator(
        OVERALL_DURATION_IN_MILLIS);
    tp.printEnvironmentInfo("DateFormatting");

    for (int i = 0; i < 2; i++) {
      tp.execute(buildArray(FormattingModel.SDF));
      tp.execute(buildArray(FormattingModel.JODA));
    }

    tp.execute(buildArray(FormattingModel.JODA));
    tp.printThroughput("JODA: ");
   
    tp.execute(buildArray(FormattingModel.SDF));
    tp.printThroughput("SDF:  ");


  }
View Full Code Here

  static int THREAD_COUNT = 1;
  static long OVERALL_DURATION_IN_MILLIS = 5000;

  public static void main(String args[]) throws InterruptedException {

    ThreadedThroughputCalculator tp = new ThreadedThroughputCalculator(
        OVERALL_DURATION_IN_MILLIS);
    tp.printEnvironmentInfo("lbclassic135  LoggingToFileThrouhput");

    LoggerContext lc = new LoggerContext();
    Logger logger = buildLoggerContext(lc);
   
    for (int i = 0; i < 2; i++) {
      tp.execute(buildArray(logger));
    }

    tp.execute(buildArray(logger));
    tp.printThroughput("File:   ");
    lc.stop();
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.contention.ThreadedThroughputCalculator

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.