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


Java Level.Invocation方法代码示例

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


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

示例1: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() {
  switch (msType) {
    case "InvertedIndexTagStore":
      int initialMapSize = 10000;
      ms = new InvertedIndexTagStore(initialMapSize, initialMapSize);
      metrics = new ArrayList();
      for (int i = 0; i < initialMapSize; i++) {
        metrics.add(randomMetric(numMetrics, numKeys, numValues));
      }
      break;
    default:
      throw new RuntimeException("invalid msType: " + msType);
  }
}
 
开发者ID:pinterest,项目名称:yuvi,代码行数:16,代码来源:InvertedIndexTagStoreBenchmark.java

示例2: afterInvocation

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@TearDown(Level.Invocation)
public void afterInvocation() {
    if (invocation == 0) {
        // Only need to check the first invocation
        invocation++;
        for (int i = 0; i < nodes.length; i++) {
            if (nodes[i] != originalNodes[i]) {
                throw new InternalError(String.format("Benchmark method mutated node %d: original=%s, current=%s", i, originalNodes[i], nodes[i]));
            }
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:NodesState.java

示例3: createTasks

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
/**
 * Runs before each invocation of the benchmark in order to store the tasks
 * that we will transition in the benchmark.
 */
@Setup(Level.Invocation)
public void createTasks() {
  tasks = new Tasks.Builder()
      .setScheduleStatus(ScheduleStatus.STARTING)
      .build(NUM_TASKS);

  storage.write(
      (NoResult.Quiet) storeProvider -> storeProvider.getUnsafeTaskStore().saveTasks(tasks));

  countDownLatch = new CountDownLatch(tasks.size());
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Mesos,代码行数:16,代码来源:StatusUpdateBenchmark.java

示例4: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() {
    items = new ArrayList<>(inputs.size());
    for (Input input : inputs) {
        final Object item;
        if (cachingOn) {
            item = Cached.create(input.accountId, input.messageIds, input.users);
        } else {
            item = NotCached.create(input.accountId, input.messageIds, input.users);
        }
        items.add(item);
    }
}
 
开发者ID:karlicoss,项目名称:autohash,代码行数:14,代码来源:TestBenchmark.java

示例5: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() throws IOException {
    this.heap = new int[count];
    this.offheap = MemoryUtil.allocate(count * 4);

    this.heap2 = new int[count];
    this.offheap2 = MemoryUtil.allocate(count * 4);
}
 
开发者ID:shunfei,项目名称:indexr,代码行数:9,代码来源:Memory.java

示例6: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() {
  message = newMessage();
  deferred = new DeferredObject<>();
}
 
开发者ID:tramchamploo,项目名称:buffer-slayer,代码行数:6,代码来源:SizeBoundedQueueBenchmark.java

示例7: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() {
  chunkStore = new ChunkImpl(
      new MetricsAndTagStoreImpl(new InvertedIndexTagStore(1_000_000, 1_000_000), new VarBitMetricStore()), null);
}
 
开发者ID:pinterest,项目名称:yuvi,代码行数:6,代码来源:ChunkIngestorBenchmark.java

示例8: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() {
  chunkManager = new ChunkManager("test", 1_000_000);
}
 
开发者ID:pinterest,项目名称:yuvi,代码行数:5,代码来源:ChunkManagerIngestorBenchmark.java

示例9: beforeInvocation

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void beforeInvocation() {
    swap();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:GuardedIntrinsicBenchmark.java

示例10: beforeInvocation

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void beforeInvocation() {
    list.clear();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:ArrayListBenchmark.java

示例11: setup

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void setup() {
    prepareRequest();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:GraalCompilerState.java

示例12: setupGraph

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
/**
 * Cannot do this {@link Level#Trial only once} since {@link #emitCode()} closes the
 * {@link CompilationResult}.
 */
@Setup(Level.Invocation)
public void setupGraph() {
    prepareRequest();
    emitFrontEnd();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:GraalCompilerState.java

示例13: beforeInvocation

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void beforeInvocation() {
    graph = (StructuredGraph) originalGraph.copy(originalGraph.getDebug());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:GraphState.java

示例14: beforeInvocation

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void beforeInvocation() {
    graph = (StructuredGraph) originalGraph.copy();
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:5,代码来源:GraphState.java

示例15: prepare

import org.openjdk.jmh.annotations.Level; //导入方法依赖的package包/类
@Setup(Level.Invocation)
public void prepare() {
    graph = TinkerGraph.open();
    g = graph.traversal();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:AbstractGraphMutateBenchmark.java


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