Search in sources :

Example 1 with PerformanceTest

use of com.thinkaurelius.titan.testutil.PerformanceTest in project titan by thinkaurelius.

the class SerializerTest method performanceTestShort.

@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));
}
Also used : PerformanceTest(com.thinkaurelius.titan.testutil.PerformanceTest) Test(org.junit.Test) PerformanceTest(com.thinkaurelius.titan.testutil.PerformanceTest)

Example 2 with PerformanceTest

use of com.thinkaurelius.titan.testutil.PerformanceTest in project titan by thinkaurelius.

the class TitanGraphPerformanceMemoryTest method elementCreationPerformance.

@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;
}
Also used : TitanVertex(com.thinkaurelius.titan.core.TitanVertex) TitanLabel(com.thinkaurelius.titan.core.TitanLabel) PerformanceTest(com.thinkaurelius.titan.testutil.PerformanceTest) StandardEdge(com.thinkaurelius.titan.graphdb.relations.StandardEdge) Test(org.junit.Test) PerformanceTest(com.thinkaurelius.titan.testutil.PerformanceTest)

Example 3 with PerformanceTest

use of com.thinkaurelius.titan.testutil.PerformanceTest in project titan by thinkaurelius.

the class SerializerTest method performanceTestLong.

@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));
}
Also used : PerformanceTest(com.thinkaurelius.titan.testutil.PerformanceTest) Test(org.junit.Test) PerformanceTest(com.thinkaurelius.titan.testutil.PerformanceTest)

Aggregations

PerformanceTest (com.thinkaurelius.titan.testutil.PerformanceTest)3 Test (org.junit.Test)3 TitanLabel (com.thinkaurelius.titan.core.TitanLabel)1 TitanVertex (com.thinkaurelius.titan.core.TitanVertex)1 StandardEdge (com.thinkaurelius.titan.graphdb.relations.StandardEdge)1