本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}
示例10: webSocketsGremlin
@BenchmarkOptions(benchmarkRounds = DEFAULT_BENCHMARK_ROUNDS, warmupRounds = DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@Test
public void webSocketsGremlin() throws Exception {
tryWebSocketGremlin();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}