MCPcopy Create free account
hub / github.com/e2wugui/zeze / report

Method report

ZezeJava/ZezeJava/src/main/java/Zeze/Util/Benchmark.java:17–26  ·  view source on GitHub ↗
(String name, long tasks)

Source from the content-addressed store, hash-verified

15 }
16
17 public double report(String name, long tasks) {
18 double cpu = ((double)os.getProcessCpuTime() - startProcessCpuTime) / 1_000_000_000;
19 var endTime = System.nanoTime();
20 var elapsedTime = endTime - startTime;
21 var seconds = (double)elapsedTime / 1_000_000_000;
22 var cpuPercent = cpu / seconds;
23 System.out.printf("%s tasks/s=%.2f tasks=%d time=%.2fs cpu=%.2fs concurrent=%.2f\n",
24 name, (tasks / seconds), tasks, seconds, cpu, cpuPercent);
25 return seconds;
26 }
27}

Callers 15

testBenchmarkMethod · 0.95
testCompressRateMethod · 0.95
testEncryptDecryptMethod · 0.95
testEncryptDecrypt2Method · 0.95
testOutputBufferCodecMethod · 0.95
testSerializeBeanMethod · 0.95
testSerializeDataMethod · 0.95
benchSendEncodeMethod · 0.95
benchSendDecodeMethod · 0.95
benchFastSendEncodeMethod · 0.95
benchFastSendDecodeMethod · 0.95

Calls

no outgoing calls

Tested by 15

testBenchmarkMethod · 0.76
testCompressRateMethod · 0.76
testEncryptDecryptMethod · 0.76
testEncryptDecrypt2Method · 0.76
testOutputBufferCodecMethod · 0.76
testSerializeBeanMethod · 0.76
testSerializeDataMethod · 0.76
benchSendEncodeMethod · 0.76
benchSendDecodeMethod · 0.76
benchFastSendEncodeMethod · 0.76
benchFastSendDecodeMethod · 0.76