{"id":18008946,"url":"https://github.com/mp3guy/stopwatch","last_synced_at":"2025-10-29T22:16:03.269Z","repository":{"id":14795671,"uuid":"17517782","full_name":"mp3guy/Stopwatch","owner":"mp3guy","description":"Easy to use simple benchmarking tool","archived":false,"fork":false,"pushed_at":"2024-11-13T18:44:44.000Z","size":89,"stargazers_count":31,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T22:21:52.596Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mp3guy.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":"2014-03-07T15:12:16.000Z","updated_at":"2025-02-01T15:41:03.000Z","dependencies_parsed_at":"2023-01-11T20:22:32.683Z","dependency_job_id":"cd77effe-aefa-48e5-85b2-f259978d7f9b","html_url":"https://github.com/mp3guy/Stopwatch","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/mp3guy%2FStopwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mp3guy%2FStopwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mp3guy%2FStopwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mp3guy%2FStopwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mp3guy","download_url":"https://codeload.github.com/mp3guy/Stopwatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245662925,"owners_count":20652099,"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-10-30T02:08:18.445Z","updated_at":"2025-10-29T22:15:58.208Z","avatar_url":"https://github.com/mp3guy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Stopwatch\n=========\n\nEasy to use simple benchmarking tool.\n\nSends UDP packets to localhost, which StopwatchViewer receives and displays stats on, including plots (credit to [Fiachra Matthews](http://www.linkedin.com/pub/fiachra-matthews/17/48b/a12) here).\n\nStopwatchViewer needs Qt6 to build. Simply include Stopwatch.h in whatever code you want to benchmark and use as such;\n\n```cpp\n#include \u003cstring\u003e\n#include \u003cstdio.h\u003e\n#include \"Stopwatch.h\"\n\nint main(int argc, char *argv[])\n{\n  //This stops duplicate timings on multiple runs\n  Stopwatch::getInstance().setCustomSignature(32434);\n\n  STOPWATCH(\"Timing1\",\n\n  if(argc \u003e= 1)\n  {\n    sleep(1);\n  }\n\n  );\n\n\n  TICK(\"Timing2\");\n\n  while(argc \u003e 0)\n  {\n    sleep(2);\n    argc--;\n  }\n\n  TOCK(\"Timing2\");\n\n  Stopwatch::getInstance().sendAll();\n}\n```\n\nThen just watch the stats in StopwatchViewer GUI. Pass in the \"-c\" flag to use the CLI instead of Qt GUI. \n\nUses some code from the B-Human code release (http://www.b-human.de/).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mp3guy/mp3guy.github.io/raw/master/img/Stopwatch.png\" alt=\"Stopwatch\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mp3guy/mp3guy.github.io/raw/master/img/StopwatchCLI.png\" alt=\"StopwatchCLI\"/\u003e\n\u003c/p\u003e\n\nInstall\n=======\n```\ngit clone  https://github.com/mp3guy/Stopwatch.git\ncd Stopwatch\ngit submodule init \u0026\u0026 git submodule update\ncd third-party/cpp-terminal\nmkdir build \u0026\u0026 cd build\ncmake .. \u0026\u0026 make -j \ncd ../../..\nmkdir build \u0026\u0026 cd build\ncmake .. \u0026\u0026 make -j\n```\nRunning Stopwatch in terminal mode without GUI\n===============================================\n```\n./Stopwatch -c\n```\nWith key bindings: \n- k or up arrow: scroll up\n- j or down arrow: scroll down\n- c: flush the cache\n- q or Esc or Ctrl+c: quit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmp3guy%2Fstopwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmp3guy%2Fstopwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmp3guy%2Fstopwatch/lists"}