Package com.google.enterprise.connector.util

Examples of com.google.enterprise.connector.util.Clock


    byte[] output = new byte[4 + ((input.length * 4) / 3)];
    // Force these arrays to be paged in before starting the clock.
    System.arraycopy(input, 0, output, 0, input.length);
    System.arraycopy(input, 0, output, input.length,
                     output.length - input.length);
    Clock clock = new SystemClock();
    long start = clock.getTimeMillis();
    Base64.encode(input, 0, input.length, output, 0, Base64.ALPHABET,
                  Integer.MAX_VALUE);
    long duration = clock.getTimeMillis() - start;
    System.out.println("testSpeed: " + duration + " millisecs");
    // OriginalBase64Encoder used to run 20x longer than this one.
    // TODO: This threshold is already 10x longer than this test
    // takes on my machine, so I don't think this is a valid
    // regression test.  Fails on code coverage and Pulse.
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.Clock

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.