Package org.apache.niolex.commons.test.StopWatch

Examples of org.apache.niolex.commons.test.StopWatch.Stop.stop()


      int k = mmapRead();
      if (k != 9910842) {
        System.out.println("ERR " + k);
        break;
      }
      s.stop();
    }
    sw.done();
    sw.print();
  }
View Full Code Here


    sw.begin(true);
    System.out.println("bufferWrite");
    for (int i = 0; i < RUN_ITER; ++i) {
      Stop s = sw.start();
      wr.bufferWrite();
      s.stop();
    }
    sw.done();
    sw.print();
    wr.clean();
View Full Code Here

    sw.begin(true);
    System.out.println("directWrite");
    for (int i = 0; i < RUN_ITER; ++i) {
      Stop s = sw.start();
      wr.directWrite();
      s.stop();
    }
    sw.done();
    sw.print();
    wr.clean();
View Full Code Here

    sw.begin(true);
    System.out.println("randomWrite");
    for (int i = 0; i < RUN_ITER; ++i) {
      Stop s = sw.start();
      wr.randomWrite();
      s.stop();
    }
    sw.done();
    sw.print();
    wr.clean();
View Full Code Here

    sw.begin(true);
    System.out.println("channelWrite");
    for (int i = 0; i < RUN_ITER; ++i) {
      Stop s = sw.start();
      wr.channelWrite();
      s.stop();
    }
    sw.done();
    sw.print();
    wr.clean();
View Full Code Here

    Field f = FieldUtil.getField(Stop.class, "startTime");
        long value = System.currentTimeMillis() - 10;
        FieldUtil.setFieldValue(s, f, value);
        FieldUtil.setFieldValue(s1, f, value);
    s.stop();
    s1.stop();
    s = sw.start();
    FieldUtil.setFieldValue(s, f, value - 10);
    s.stop();
    s = sw.start();
    FieldUtil.setFieldValue(s, f, value - 1490);
View Full Code Here

    Field f = FieldUtil.getField(Stop.class, "startTime");
    long value = System.currentTimeMillis() - 10;
    FieldUtil.setFieldValue(s, f, value);
    FieldUtil.setFieldValue(s1, f, --value);
    s.stop();
    s1.stop();
    s = sw.start();
    FieldUtil.setFieldValue(s, f, value - 10);
    s.stop();
    s = sw.start();
    FieldUtil.setFieldValue(s, f, value - 1490);
View Full Code Here

            @Override
            protected void run() {
                Stop start = sw.start();
                ThreadUtil.sleep(MathUtil.randInt(10));
                start.stop();
            }};
        perf.start();
        sw.done();
        sw.print();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.