These changes are dependent on the changes purposed in https://reviews.llvm.org/D43314.
With the purposed changes to lit we can report the individual timing results for each microbenchmark with one test. This updates the litsupport plugin to make further use of the benchmark library.
I have also changed the current microbenchmarks that use this plugin by removing the individual tests from the XRay microbenchmarks as they should no longer be needed. Please let me know if this causes any problems with the XRay tests uses @eizan .
With the purposed changes example output is:
Terminal:
PASS: test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench.test (1 of 1) ********** TEST 'test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench.test' RESULTS ********** MicroBenchmarks: 6 compile_time: 0.6487 hash: "daec0d37414da26fdae56f0d9bfa2cc0" link_time: 0.0637 ********** *** MICRO-TEST 'BM_RDTSCP_Cost RESULTS *** exec_time: 12.7087 *** MICRO-TEST 'BM_ReturnInstrumentedPatched RESULTS *** exec_time: 9.0223 *** MICRO-TEST 'BM_ReturnInstrumentedPatchedThenUnpatched RESULTS *** exec_time: 2.6744 *** MICRO-TEST 'BM_ReturnInstrumentedPatchedWithLogHandler RESULTS *** exec_time: 36.5216 *** MICRO-TEST 'BM_ReturnInstrumentedUnPatched RESULTS *** exec_time: 2.6745 *** MICRO-TEST 'BM_ReturnNeverInstrumented RESULTS *** exec_time: 2.0074 **********
JSON output:
"tests": [ { "code": "PASS", "elapsed": null, "metrics": { "exec_time": 2.67445 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench/BM_ReturnInstrumentedUnPatched.test", "output": "" }, { "code": "PASS", "elapsed": null, "metrics": { "exec_time": 2.67435 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench/BM_ReturnInstrumentedPatchedThenUnpatched.test", "output": "" }, { "code": "PASS", "elapsed": null, "metrics": { "exec_time": 36.5216 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench/BM_ReturnInstrumentedPatchedWithLogHandler.test", "output": "" }, { "code": "PASS", "elapsed": null, "metrics": { "exec_time": 12.7087 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench/BM_RDTSCP_Cost.test", "output": "" }, { "code": "PASS", "elapsed": null, "metrics": { "exec_time": 2.00737 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench/BM_ReturnNeverInstrumented.test", "output": "" }, { "code": "PASS", "elapsed": null, "metrics": { "exec_time": 9.02227 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench/BM_ReturnInstrumentedPatched.test", "output": "" }, { "code": "PASS", "elapsed": 5.6960108280181885, "metrics": { "MicroBenchmarks": 6, "compile_time": 0.6487, "hash": "daec0d37414da26fdae56f0d9bfa2cc0", "link_time": 0.0637 }, "name": "test-suite :: MicroBenchmarks/XRay/ReturnReference/retref-bench.test", "output": "\nMicroBenchmarks/XRay/ReturnReference/retref-bench --benchmark_format=csv > MicroBenchmarks/XRay/ReturnReference/Output/retref-bench.test.bench.csv" }