{"id":24143833,"url":"https://github.com/dnbaker/timestamper","last_synced_at":"2026-05-15T07:32:22.665Z","repository":{"id":94818733,"uuid":"274997796","full_name":"dnbaker/timestamper","owner":"dnbaker","description":"Track subprogram runtimes","archived":false,"fork":false,"pushed_at":"2020-06-25T19:28:11.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T14:33:03.388Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnbaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-06-25T19:23:31.000Z","updated_at":"2020-06-25T19:28:13.000Z","dependencies_parsed_at":"2023-04-24T06:02:23.212Z","dependency_job_id":null,"html_url":"https://github.com/dnbaker/timestamper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dnbaker/timestamper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbaker%2Ftimestamper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbaker%2Ftimestamper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbaker%2Ftimestamper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbaker%2Ftimestamper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnbaker","download_url":"https://codeload.github.com/dnbaker/timestamper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbaker%2Ftimestamper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33057852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-01-12T05:45:42.443Z","updated_at":"2026-05-15T07:32:22.657Z","avatar_url":"https://github.com/dnbaker.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timestamper: track runtimes\n\nTimestamper maintains a list of time points with labels, then emits them in sorted order at conclusion listing the amount of time spent on each task.\n\n#  Demo\n```c+++\n#include \u003cmemory\u003e\n#include \u003cstring\u003e\n\nint main() {\n    timestamp::TimeStamper ts(\"time things\");\n    ts.add_event(\"Allocate vector of strings\");\n    static constexpr unsigned long long nelem = 1000000;\n    auto strs = std::make_unique\u003cstd::string[]\u003e(nelem);\n    auto strb = strs.get(), stre = strs.get() + nelem;\n    ts.add_event(\"Set strings to be integer encoding\");\n    for(unsigned i = 0; i \u003c 1000000; ++i) {\n        strs[i] = std::to_string(i);\n    }\n    ts.add_event(\"Sort by lexicographic order\");\n    std::sort(strb, stre);\n    ts.add_event(\"Sort by reverse lexicographic order\");\n    std::sort(strb, stre, [](const auto \u0026x, const auto \u0026y) {return x \u003e y;});\n    ts.add_event(\"Destroy strings\");\n    {\n        auto newstrs = std::move(strs);\n    }\n    ts.add_event(\"Stack unwinding\");\n}\n\n```\n\nOutput might be something like:\n\n```\n##Total: 653.164ms\n#EventID\tEventName\tRank\tTotal\tFraction\n3\tSort by lexicographic order\t1\t434.267ms\t%66.4866710351\n4\tSort by reverse lexicographic order\t2\t113.212ms\t%17.3328597412\n2\tSet strings to be integer encoding\t3\t88.383ms\t%13.5315173525\n1\tAllocate vector of strings\t4\t12.461ms\t%1.90779038649\n5\tDestroy strings\t5\t4.835ms\t%0.740242879277\n0\ttime things\t6\t0.006ms\t%0.00091860543447\n6\tStack unwinding\t7\t0ms\t%0\n```\n# Motivation\n\nOn OSX, `-pg`-based profiling does not work, and standard profilers typically have function-level runtime analysis rather than task-level. This tools solves both problems.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbaker%2Ftimestamper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnbaker%2Ftimestamper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbaker%2Ftimestamper/lists"}