Examples of nanoTime()


Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT * 10; k++) {
      final int[] array = BenchBasic.testMakeArray0(SIZE);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT / 10;
    log.info("make arrray 1024; nanos={}", nanos);

    final int[] arrayInt = new int[SIZE];
    timer.start();
    for (int k = 0; k < COUNT; k++) {
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testGetSetArray0(arrayInt, true);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("get/set/update array; nanos={}", nanos);
    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testGetSetArray0(arrayInt, false);
    }
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testGetSetArray0(arrayInt, false);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("get/set/abort  array; nanos={}", nanos);

    final Object[] array = new Object[SIZE];
    timer.start();
    for (int k = 0; k < COUNT; k++) {
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testIterateArray0(array);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT / SIZE;
    log.info("iterate object array; nanos={}", nanos);

    //
    final Set<Object> set = new HashSet<Object>();
    for (int k = 0; k < SIZE; k++) {
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT / 10; k++) {
      BenchBasic.testIterateSet0(set);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT / SIZE * 10;
    log.info("iterate object set; nanos={}", nanos);

    //

    final int FILL_SIZE = 1024;
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testFillArray0(fillArray);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("fillArray;  nanos={}", nanos);

    final ByteBuffer fillBuffer = ByteBuffer.allocateDirect(FILL_SIZE);
    timer.start();
    for (int k = 0; k < COUNT; k++) {
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testFillBuffer0(fillBuffer);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("fillBuffer; nanos={}", nanos);

    final IntBuffer loadBuffer = HelpUDT.newDirectIntBufer(1024);
    timer.start();
    for (int k = 0; k < COUNT; k++) {
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      BenchBasic.testDirectIntBufferLoad0(loadBuffer);
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("loadBuffer; nanos={}", nanos);

  }

}
View Full Code Here

Examples of util.StopWatch.nanoTime()

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      // baseline
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("baseline nanos={}", nanos);

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      // small array
View Full Code Here

Examples of util.StopWatch.nanoTime()

    for (int k = 0; k < COUNT; k++) {
      // small array
      final byte[] array = new byte[128];
    }
    timer.stop();
    nanos = timer.nanoTime() / COUNT;
    log.info("make array 123; nanos={}", nanos);

    timer.start();
    for (int k = 0; k < COUNT; k++) {
      // medium array
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.