{"id":19943205,"url":"https://github.com/root-project/rootbench","last_synced_at":"2025-05-08T03:53:10.257Z","repository":{"id":26174116,"uuid":"100357329","full_name":"root-project/rootbench","owner":"root-project","description":"Collection of benchmarks and performance monitoring applications","archived":false,"fork":false,"pushed_at":"2024-11-12T16:45:24.000Z","size":560,"stargazers_count":22,"open_issues_count":31,"forks_count":41,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-08T03:53:03.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/root-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-15T08:39:45.000Z","updated_at":"2024-11-12T16:45:28.000Z","dependencies_parsed_at":"2023-02-19T09:45:26.026Z","dependency_job_id":"0bde1231-fe07-4fac-a42a-39b8708e32a9","html_url":"https://github.com/root-project/rootbench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Frootbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Frootbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Frootbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Frootbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/root-project","download_url":"https://codeload.github.com/root-project/rootbench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252996327,"owners_count":21837620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T00:15:47.009Z","updated_at":"2025-05-08T03:53:10.237Z","avatar_url":"https://github.com/root-project.png","language":"C++","readme":"# ROOT Benchmarks\n\nThis repository contains a set of relatively small programs (usually based on [gbenchmark](https://github.com/google/benchmark) micro benchmarking infrastructure) built on top of [ROOT](https://github.com/root-project/root). Their primary goal is to provide stable performance metrics which can be monitored over time.\n\nResults of nightly run of ROOT benchmarks could be discovered in the Rootbench.git Grafana instance: [RootBench Grafana](https://rootbnch-grafana-test.cern.ch/).\n\n# Project Health\n|       |     |\n| :---: |:---:|\n| Linux/OSX [![Build Status](https://travis-ci.org/root-project/rootbench.svg?branch=master)](https://travis-ci.org/root-project/rootbench) | Experimental Benchmark Coverage: [![Coverage Status](https://coveralls.io/repos/github/root-project/rootbench/badge.svg?branch=master)](https://coveralls.io/github/root-project/rootbench?branch=master)  |  \n\n## Cite\n```latex\n@inproceedings{shadura2019continuous,\n  title={Continuous Performance Benchmarking Framework for ROOT},\n  author={Shadura, Oksana and Vassilev, Vassil and Bockelman, Brian Paul},\n  booktitle={EPJ Web of Conferences},\n  volume={214},\n  pages={05003},\n  year={2019},\n  organization={EDP Sciences}\n}\n```\n\n## Building\nROOTBench can be built standalone and as part of ROOT. If you want to enable ROOTBench for ROOT just add the `-Drootbench=On` option to your cmake configuration.\n\n### Building ROOTBench standalone\nROOTBench should be able to find ROOT at configuration time. Make sure you ran `source $ROOTSYS/bin/thisroot.sh`.\n```bash\ngit clone https://github.com/root-project/rootbench.git\nmkdir build\ncd build\ncmake ../rootbench\ncmake --build . -- -j$(nproc)\n```\nalso, you can use \n```\ncmake --build . -- -jN\n```\nwhere 'N' is the maximum number of processor cores you want to use.\n## Extending the benchmarks\nROOTBench relies on [Google Benchmark](https://github.com/google/benchmark). We recommend to read the [available documentation](https://github.com/google/benchmark/blob/master/README.md) and browse the existing examples [here](https://github.com/google/benchmark/tree/master/test) for more advanced usage.\n\n### Background\nThis repository is being integrated in two steps:\n  * We run TravisCI on each pull request -- the public infrastructure is time limited and we use the latest ROOT nightly build available in CVMFS and EOS. This way we can integrate with public services such as Coveralls. Based on the TravisCI information we compute the benchmarking coverage of ROOTBench against ROOT. The idea is to make sure that we have well-distributed benchmarking coverage.\n  * We run on dedicated CERN OpenLab machines twice a day -- we build ROOT and ROOTBench from scratch and collect performance data. The data is uploaded to our Grafana service available [here](https://rootbnch-grafana-test.cern.ch) (requires CERN login).\n  \nThe integration process depends on the overall benchmarking time. Contributors are encouraged to write well-focused microbenchmarks ensuring good benchmarking coverage. Non-overlapping microbenchmarks seem to be the only reasonable way to control the pressure on the infrastructure.\n\n### Conventions\nThere are several practical conventions that we should follow:\n  * Coding conventions -- ROOTBench follows the [coding conventions of ROOT](https://root.cern.ch/coding-conventions) to a great extent.\n  * The routines used for benchmarking shall have the following names `BM_CLASSNAME_ROUTINE` -- the `BM` prefix allows us (or tools) to easily identify which is the main benchmarking function.  \n\n### Simple benchmark template\nAdd file called CLASSNAMEBenchmarks.cxx where CLASSNAME is the name of the ROOT class we benchmark.\n\n```cpp\n#include \"ROOT_HEADER_TO_BENCHMARK.h\"\n\n#include \"benchmark/benchmark.h\"\n\n// Replace the CLASSNAME and ROUTINE with the ROOT class and routine you are benchmarking respectively. \nstatic void BM_CLASSNAME_ROUTINE(benchmark::State \u0026state) {\n  // Initialization section before actual benchmarking.\n  for (auto _ : state) {\n    // The benchmarking code goes here.\n  }\n  // Teardown.\n}\nBENCHMARK(BM_CLASSNAME_ROUTINE);\n\n// In the end of the file we add our main().\nBENCHMARK_MAIN();\n```\n\nRegister the benchmark in the system. Add an entry to the `CMakeLists.txt` next to the source code of the benchmark.\n\n```cmake\nRB_ADD_GBENCHMARK(CLASSNAMEBenchmarks\n  CLASSNAMEBenchmarks.cxx\n  LABEL short\n  LIBRARIES LIST OF LIB DEPENDENCIES)\n```\n\nThis is a very basic working example. If you need extra functionality please read the [Google Benchmark Docs](https://github.com/google/benchmark/blob/master/README.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot-project%2Frootbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froot-project%2Frootbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot-project%2Frootbench/lists"}