Examples of PerformanceTest


Examples of com.thinkaurelius.titan.testutil.PerformanceTest

    @Test
    public void elementCreationPerformance() {
        TitanLabel connect = makeSimpleEdgeLabel("connect");
        int noNodes = 20000;
        TitanVertex[] nodes = new TitanVertex[noNodes];
        PerformanceTest p = new PerformanceTest(true);
        for (int i = 0; i < noNodes; i++) {
            nodes[i] = tx.addVertex();
        }
        p.end();
        System.out.println("Time per node in (ns): " + (p.getNanoTime() / noNodes));

        p = new PerformanceTest(true);
        for (int i = 0; i < noNodes; i++) {
            new StandardEdge(i + 1, connect, (InternalVertex) nodes[i], (InternalVertex) nodes[(i + 1) % noNodes], ElementLifeCycle.New);
        }
        p.end();
        System.out.println("Time per edge in (ns): " + (p.getNanoTime() / noNodes));

        p = new PerformanceTest(true);
        for (int i = 0; i < noNodes; i++) {
            nodes[i].addEdge(connect, nodes[(i + 1) % noNodes]);
        }
        p.end();
        System.out.println("Time per edge creation+connection in (ns): " + (p.getNanoTime() / noNodes));
        tx.rollback();
        tx = null;
    }
View Full Code Here

Examples of com.thinkaurelius.titan.testutil.PerformanceTest

    @Test
    public void performanceTestLong() {
        int runs = 10000;
        printStats = false;
        PerformanceTest p = new PerformanceTest(true);
        for (int i = 0; i < runs; i++) {
            longWriteTest();
        }
        p.end();
        log.debug("LONG: Avg micro time: " + (p.getMicroTime() / runs));
    }
View Full Code Here

Examples of com.thinkaurelius.titan.testutil.PerformanceTest

    @Test
    public void performanceTestShort() {
        int runs = 10000;
        printStats = false;
        PerformanceTest p = new PerformanceTest(true);
        for (int i = 0; i < runs; i++) {
            objectWriteRead();
        }
        p.end();
        log.debug("SHORT: Avg micro time: " + (p.getMicroTime() / runs));
    }
View Full Code Here

Examples of org.apache.sling.performance.annotation.PerformanceTest

    Object response = null;

    Method testMethodToInvoke = this.getMethod();

    PerformanceTest performanceAnnotation = testMethodToInvoke
        .getAnnotation(PerformanceTest.class);

    // retrieve the test configuration options
    int warmuptime = performanceAnnotation.warmuptime();
    int runtime = performanceAnnotation.runtime();
    int warmupinvocations = performanceAnnotation.warmupinvocations();
    int runinvocations = performanceAnnotation.runinvocations();

    DescriptiveStatistics statistics = new DescriptiveStatistics();

    if (warmupinvocations != 0) {
      // Run the number of invocation specified in the annotation
View Full Code Here

Examples of org.ejbca.util.PerformanceTest

            if( args.length>9 ) {
                this.keyStorePassword = args[9];
            } else {
                this.keyStorePassword = null;
            }
            this.performanceTest = new PerformanceTest();
            this.performanceTest.execute(new MyCommandFactory(), numberOfThreads, waitTime, System.out);
        }
View Full Code Here

Examples of org.ejbca.util.PerformanceTest

                    final String providerName,
                    final int numberOfThreads,
                    final int waitTime,
                    final boolean isSignTest) throws Exception {
            super(alias, keyPair, providerName);
            this.performanceTest = new PerformanceTest();
            this.performanceTest.execute(new MyCommandFactory(isSignTest), numberOfThreads, waitTime, termOut);
        }
View Full Code Here

Examples of org.ejbca.util.PerformanceTest

            this.keyPair = keygen.generateKeyPair();

            // Just initialize and take the performance penalty here, in vmware this can take a long time.
            this.random.nextInt();
           
            this.performanceTest = new PerformanceTest();
            this.performanceTest.execute(new MyCommandFactory(userCNBase), numberOfThreads, waitTime, System.out);
        }
View Full Code Here

Examples of org.ejbca.util.PerformanceTest

    static private class StressTest {
        final PerformanceTest performanceTest;
        StressTest( final String httpPath,
                    final int numberOfThreads,
                    final int waitTime) throws Exception {
            performanceTest = new PerformanceTest();
            performanceTest.execute(new MyCommandFactory(httpPath), numberOfThreads, waitTime, System.out);
        }
View Full Code Here

Examples of org.ejbca.util.PerformanceTest

            final KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA");
            keygen.initialize(2048);
            this.keyPair = keygen.generateKeyPair();

            this.performanceTest = new PerformanceTest();
            this.performanceTest.execute(new MyCommandFactory(), numberOfThreads, waitTime, System.out);
        }
View Full Code Here

Examples of org.ejbca.util.PerformanceTest

    /**
     * @param args
     */
    public StressTestCommand(String[] _args) {
        super(_args);
        this.performanceTest = new PerformanceTest();
    }
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.