org.openjdk.jmh.results.BenchmarkResult Java Examples

The following examples show how to use org.openjdk.jmh.results.BenchmarkResult. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ResultExporter.java    From SpringBootBucket with MIT License 5 votes vote down vote up
public static void exportResult(String titleStr, Collection<RunResult> results,
                                String paramKey, String xunit) throws Exception {
    // 几个测试对象
    List<String> objects = new ArrayList<>();
    // 测试维度,输入值n
    List<String> dimensions = new ArrayList<>();
    // 有几个测试对象,就有几组测试数据,每组测试数据中对应几个维度的结果
    List<List<Double>> allData = new ArrayList<>();
    List<Double> temp = new ArrayList<>();
    for (RunResult runResult : results) {
        BenchmarkResult benchmarkResult = runResult.getAggregatedResult();
        Result r = benchmarkResult.getPrimaryResult();
        BenchmarkParams params = runResult.getParams();
        if (!objects.contains(r.getLabel())) {
            objects.add(r.getLabel());
            if (!temp.isEmpty()) {
                allData.add(temp);
                temp = new ArrayList<>();
            }
        }
        temp.add(Double.parseDouble(String.format("%.2f", r.getScore())));
        // 测试维度
        if (!dimensions.contains("n=" + params.getParam(paramKey))) {
            dimensions.add("n=" + params.getParam(paramKey));
        }
    }
    // 最后一组测试数据别忘记加进去了
    allData.add(temp);

    String optionStr = generateOption(titleStr, objects, dimensions, allData, xunit);
    // POST到接口上
    postOption(optionStr, "http://localhost:9075/api/v1/data");
}
 
Example #2
Source File: FlightRecorderProfiler.java    From tlaplus with MIT License 4 votes vote down vote up
@Override
public Collection<? extends Result> afterTrial(BenchmarkResult arg0, long arg1, File arg2, File arg3) {
       return new ArrayList<>();
}
 
Example #3
Source File: FlightRecorderProfiler.java    From cglib with Apache License 2.0 4 votes vote down vote up
@Override
public Collection<? extends Result> afterTrial(BenchmarkResult br, long pid, File stdOut, File stdErr) {
    return Collections.emptyList();
}
 
Example #4
Source File: FlightRecorderProfiler.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Override public Collection<? extends Result> afterTrial(BenchmarkResult br, long pid,
    File stdOut, File stdErr) {
  return Collections.emptyList();
}