Package org.apache.niolex.commons.test

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


    StreamWrite wr = new StreamWrite();
    wr.init();
    System.out.println("Parameters: [" + WRITE_BATCH + "][" + WRITE_ONE +"]");
    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();
View Full Code Here


    }
    sw.done();
    sw.print();
    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();
View Full Code Here

    }
    sw.done();
    sw.print();
    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();
View Full Code Here

    }
    sw.done();
    sw.print();
    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();
View Full Code Here

    /**
     * @param args
     */
    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);
View Full Code Here

        disp.register(new FinishStage());

        disp.construction();
        disp.startAdjust(1000);
        group.list();
        sw.begin(false);

        System.out.println("Stage 1 - dispatch 5K/s, 100(1ms) : 1(100ms) weight messages; for 30 sec.");

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 5000; ++j) {
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.