Package org.apache.niolex.commons.test

Examples of org.apache.niolex.commons.test.StopWatch.start()


    wr.clean();

    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();
View Full Code Here


    wr.clean();

    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();
View Full Code Here

    wr.clean();

    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();
View Full Code Here

    wr.clean();

    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();
View Full Code Here

    public static void main(String[] args) {
        StopWatch w = new StopWatch(1);
        w.begin(true);
        for (int i = 0; i < 1000; ++i) {
            Map<Integer, Boolean> map = Maps.newHashMap();
            Stop s = w.start();
            for (int j = 0; j < 10000; ++j) {
                map.put(j, j % 2 == 0);
            }
            for (int j = 0; j < 10000; ++j) {
                Check.isTrue(map.get(j).booleanValue() == (j % 2 == 0));
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.