The API for most uses is simple: you supply the code to be benchmarked to a Benchmark constructor.
API 的基本用法很简单:把要进行基准测试的代码提供给一个 Benchmark 构造函数。
In Listing 1, main defines the code to be benchmarked as a Callable and simply supplies it to a benchmark constructor.
在清单1中,main把要测试的代码定义为Callable,然后提供给Benchmark构造函数。
The most practical way is to minimize the number of cases during the design phase so that fewer cases need to be benchmarked later.
最实用的方法就是减少设计阶段中的案例数,这样的话稍后需要进行基准测试的案例就比较少了。
应用推荐