当前位置: 首页>>代码示例>>Java>>正文


Java BenchmarkOptions.CONCURRENCY_SEQUENTIAL属性代码示例

本文整理汇总了Java中com.carrotsearch.junitbenchmarks.BenchmarkOptions.CONCURRENCY_SEQUENTIAL属性的典型用法代码示例。如果您正苦于以下问题:Java BenchmarkOptions.CONCURRENCY_SEQUENTIAL属性的具体用法?Java BenchmarkOptions.CONCURRENCY_SEQUENTIAL怎么用?Java BenchmarkOptions.CONCURRENCY_SEQUENTIAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.carrotsearch.junitbenchmarks.BenchmarkOptions的用法示例。


在下文中一共展示了BenchmarkOptions.CONCURRENCY_SEQUENTIAL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readAllVerticesAndProperties

@Test
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void readAllVerticesAndProperties() throws Exception {
    final AtomicInteger counter = new AtomicInteger(0);

    // read the vertices 10 times over
    for (int ix = 0; ix < 10; ix++) {
        graph.vertices().forEachRemaining(vertex -> {
            assertNotNull(vertex.value("name"));
            counter.incrementAndGet();
        });

        assertEquals(10000, counter.get());
        counter.set(0);
    }
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:16,代码来源:GraphReadPerformanceTest.java

示例2: readAllEdgesAndProperties

@Test
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void readAllEdgesAndProperties() throws Exception {
    final AtomicInteger counter = new AtomicInteger(0);

    // read the vertices 10 times over
    for (int ix = 0; ix < 10; ix++) {
        graph.edges().forEachRemaining(edge -> {
            assertNotNull(edge.value("weight"));
            counter.incrementAndGet();
        });

        assertEquals(edgeCount, counter.get());
        counter.set(0);
    }
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:16,代码来源:GraphReadPerformanceTest.java

示例3: writeEmptyVerticesAndEdges

@Test
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void writeEmptyVerticesAndEdges() throws Exception {
    final int verticesToGenerate = 100000;
    Optional<Vertex> lastVertex = Optional.empty();
    for (int ix = 0; ix < verticesToGenerate; ix++) {
        final Vertex v = graph.addVertex();
        if (lastVertex.isPresent())
            v.addEdge("parent", lastVertex.get());

        lastVertex = Optional.of(v);
        tryBatchCommit(graph, ix);
    }

    assertVertexEdgeCounts(graph, verticesToGenerate, verticesToGenerate - 1);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:16,代码来源:GraphWritePerformanceTest.java

示例4: writeEmptyVertices

@Test
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void writeEmptyVertices() throws Exception {
    final int verticesToGenerate = 100000;
    for (int ix = 0; ix < verticesToGenerate; ix++) {
        graph.addVertex();
        tryBatchCommit(graph, ix);
    }

    assertVertexEdgeCounts(graph, verticesToGenerate, 0);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:11,代码来源:GraphWritePerformanceTest.java

示例5: writeGryo

@Test
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void writeGryo() throws Exception {
    final GraphWriter writer = graph.io(GryoIo.build()).writer().create();
    final OutputStream os = new ByteArrayOutputStream();
    writer.writeGraph(os, graph);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:8,代码来源:GraphWritePerformanceTest.java

示例6: writeGraphML

@Test
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void writeGraphML() throws Exception {
    final GraphWriter writer = graph.io(GraphMLIo.build()).writer().create();
    final OutputStream os = new ByteArrayOutputStream();
    writer.writeGraph(os, graph);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:8,代码来源:GraphWritePerformanceTest.java

示例7: writeGraphSON

@Test
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
public void writeGraphSON() throws Exception {
    final GraphWriter writer = graph.io(GraphSONIo.build()).writer().create();
    final OutputStream os = new ByteArrayOutputStream();
    writer.writeGraph(os, graph);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:8,代码来源:GraphWritePerformanceTest.java

示例8: g_V_match_selectXbX_valuesXnameX

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_V_match_selectXbX_valuesXnameX() throws Exception {
    g.V().match(
            __.as("a").has("name", "Garcia"),
            __.as("a").in("writtenBy").as("b"),
            __.as("a").in("sungBy").as("b")).select("b").values("name").iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:9,代码来源:TraversalPerformanceTest.java

示例9: g_E_hasLabelXwrittenByX_whereXinV_inEXsungByX_count_isX0XX_subgraphXsgX

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_E_hasLabelXwrittenByX_whereXinV_inEXsungByX_count_isX0XX_subgraphXsgX() throws Exception {
    g.E().hasLabel("writtenBy").where(__.inV().inE("sungBy").count().is(0)).subgraph("sg").iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:TraversalPerformanceTest.java

示例10: webSocketsGremlin

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@Test
public void webSocketsGremlin() throws Exception {
    tryWebSocketGremlin();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:5,代码来源:GremlinAdditionPerformanceTest.java

示例11: g_V_outE_inV_outE_inV_outE_inV

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_V_outE_inV_outE_inV_outE_inV() throws Exception {
    g.V().outE().inV().outE().inV().outE().inV().iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:TraversalPerformanceTest.java

示例12: g_V_out_out_out

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_V_out_out_out() throws Exception {
    g.V().out().out().out().iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:TraversalPerformanceTest.java

示例13: g_V_out_out_out_path

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_V_out_out_out_path() throws Exception {
    g.V().out().out().out().path().iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:TraversalPerformanceTest.java

示例14: g_V_repeatXoutX_timesX2X

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_V_repeatXoutX_timesX2X() throws Exception {
    g.V().repeat(out()).times(2).iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:TraversalPerformanceTest.java

示例15: g_V_repeatXoutX_timesX3X

@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
@Test
public void g_V_repeatXoutX_timesX3X() throws Exception {
    g.V().repeat(out()).times(3).iterate();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:TraversalPerformanceTest.java


注:本文中的com.carrotsearch.junitbenchmarks.BenchmarkOptions.CONCURRENCY_SEQUENTIAL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。