From cc2003cf25d0ceb0e0e8494801fae56968daad7e Mon Sep 17 00:00:00 2001 From: denes Date: Mon, 7 Oct 2019 11:57:47 +0200 Subject: [PATCH] Updating the readme file --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e49ef04..ffced50 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ # performance_measuring -Scripts and tools to measure performance. \ No newline at end of file +Scripts and tools to measure performance. + +This repo meant to be a sandbox. + +## The tested dummy algorithm + +The measured algorithms are 3 variations on *counting the smallest element in a array*. + + * C style, count-as-go: O(n) + * C++ `std::min_element` then `std::count`: O(n) + O(n) + * C++ `std::sort` then `std::upper_bound`: O(n log n) + O(n) + +## Environment + +The array contains 10k randomly generated integers [0, 1000]. + +The machine which generated the results is an [Intel NUC 7CJYH](https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7cjyh.html). + +## Catch2's benchmarking tools + +Using [catch2](https://github.com/catchorg/Catch2), an example output of `performance_measuring_test`: + +![tests.png](https://jenkins.matetelki.eu/job/gitea.matetelki.eu/job/performance_measuring/job/master/lastSuccessfulBuild/artifact/tests.png) + +## Flamegraph + +An interactive [flamegraph](https://github.com/brendangregg/FlameGraph) can be generated to visualize [perf](http://www.brendangregg.com/perf.html)'s measurements, where the callgraph can be traversed. + +![flamegraph.svg](https://jenkins.matetelki.eu/job/gitea.matetelki.eu/job/performance_measuring/job/master/lastSuccessfulBuild/artifact/flamegraph.svg)