{"id":13665338,"url":"https://github.com/disruptek/golden","last_synced_at":"2025-04-09T16:18:48.384Z","repository":{"id":78132209,"uuid":"211968138","full_name":"disruptek/golden","owner":"disruptek","description":"a benchmark for compile-time and/or runtime Nim 🏆","archived":false,"fork":false,"pushed_at":"2021-01-14T19:33:19.000Z","size":153,"stargazers_count":29,"open_issues_count":10,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T16:18:19.795Z","etag":null,"topics":["bench","benchmark","compile","golden","nim","profile","profiling","run","runtime"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/disruptek.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}},"created_at":"2019-09-30T22:22:23.000Z","updated_at":"2024-10-10T20:18:07.000Z","dependencies_parsed_at":"2023-02-24T02:00:45.123Z","dependency_job_id":null,"html_url":"https://github.com/disruptek/golden","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgolden","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgolden/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgolden/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgolden/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disruptek","download_url":"https://codeload.github.com/disruptek/golden/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"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":["bench","benchmark","compile","golden","nim","profile","profiling","run","runtime"],"created_at":"2024-08-02T06:00:32.997Z","updated_at":"2025-04-09T16:18:48.357Z","avatar_url":"https://github.com/disruptek.png","language":"Nim","funding_links":[],"categories":["性能测试","Development Tools"],"sub_categories":["Benchmarking"],"readme":"# golden\n\nA benchmarking tool that measures and records runtime of any executable and\nalso happens to know how to compile Nim.\n\n- `cpp +/ nim-1.0` [![Build Status](https://travis-ci.org/disruptek/golden.svg?branch=master)](https://travis-ci.org/disruptek/golden)\n- `arc +/ cpp +/ nim-1.3` [![Build Status](https://travis-ci.org/disruptek/golden.svg?branch=devel)](https://travis-ci.org/disruptek/golden)\n\nThe idea here is that we're gonna make a record of everything we run,\neverything we build, and be able to discover and pinpoint regressions\nautomatically using native git-fu performed by the tool.  Fire and forget!\n\n## Installation\n\n### Nimph\n\n```\n$ nimph clone golden\n```\n\n### Nimble\n\n```\n$ nimble install golden\n```\n\n## Usage\n\nIf you pass it a binary, it'll run it a bunch of times and report some runtime\nstatistics periodically.\n\nIf you pass it some Nim source, it will compile it for you and report some\ncompilation and runtime statistics periodically.\n\nBy default, it will run until you interrupt it.\n\n```\n$ golden --truth=0.002 bench.nim\ncompilations after 0s\n┌────────┬──────────┬──────────┬──────────┬──────────┐\n│ Builds │ Min      │ Max      │ Mean     │ StdDev   │\n├────────┼──────────┼──────────┼──────────┼──────────┤\n│      1 │ 0.396129 │ 0.396129 │ 0.396129 │ 0.000000 │\n└────────┴──────────┴──────────┴──────────┴──────────┘\nbenchmark after 1s\n┌────────┬──────────┬──────────┬──────────┬──────────┐\n│ Runs   │ Min      │ Max      │ Mean     │ StdDev   │\n├────────┼──────────┼──────────┼──────────┼──────────┤\n│      1 │ 1.959187 │ 1.959187 │ 1.959187 │ 0.000000 │\n└────────┴──────────┴──────────┴──────────┴──────────┘\nbenchmark after 3s\n┌────────┬──────────┬──────────┬──────────┬──────────┐\n│ Runs   │ Min      │ Max      │ Mean     │ StdDev   │\n├────────┼──────────┼──────────┼──────────┼──────────┤\n│      2 │ 1.958892 │ 1.959187 │ 1.959039 │ 0.000147 │\n└────────┴──────────┴──────────┴──────────┴──────────┘\ncompleted benchmark after 5s\n┌────────┬──────────┬──────────┬──────────┬──────────┐\n│ Runs   │ Min      │ Max      │ Mean     │ StdDev   │\n├────────┼──────────┼──────────┼──────────┼──────────┤\n│      3 │ 1.958892 │ 1.961293 │ 1.959791 │ 0.001069 │\n└────────┴──────────┴──────────┴──────────┴──────────┘\n```\n\nBenchmarking the compilation of Nim itself:\n```\n$ cd ~/git/Nim\n$ golden koch -- boot -d:danger\n# ...\n┌────────┬──────────┬──────────┬──────────┬──────────┐\n│ #      │ Min      │ Max      │ Mean     │ StdDev   │\n├────────┼──────────┼──────────┼──────────┼──────────┤\n│     12 │ 8.846606 │ 9.485832 │ 8.945023 │ 0.165638 │\n└────────┴──────────┴──────────┴──────────┴──────────┘\n```\n\nBenchmarking compilation of slow-to-compile Nim:\n\n```\n$ golden --compilation openapi.nim\n┌────────┬───────────┬───────────┬───────────┬──────────┐\n│      # │ Min       │ Max       │ Mean      │ StdDev   │\n├────────┼───────────┼───────────┼───────────┼──────────┤\n│      1 │ 91.946370 │ 91.946370 │ 91.946370 │ 0.000000 │\n└────────┴───────────┴───────────┴───────────┴──────────┘\n┌────────┬───────────┬───────────┬───────────┬───────────┐\n│      # │ Min       │ Max       │ Mean      │ StdDev    │\n├────────┼───────────┼───────────┼───────────┼───────────┤\n│      2 │ 29.271556 │ 91.946370 │ 60.608963 │ 31.337407 │\n└────────┴───────────┴───────────┴───────────┴───────────┘\n```\n\n## Command Line Options\n\n - `truth` a float percentage indicating how much jitter you'll accept\n - `runtime` a float of seconds after which we should kill each invocation\n - `iterations` a number of invocations after which we should stop the benchmark\n - `storage` the path to a database file you wish to use; must end in `.golden-lmdb`\n - `interactive-forced` assume output friendly to humans\n - `json-output` assume output friendly to machines _(work in progress)_\n - `color-forced` enable color output when not in `interactive` mode\n - `prune-outliers` throw out this percentage of aberrant invocations with long runtime in order to clean up the histogram\n - `dry-run` don't write any results to the database\n - `histogram-classes` the number of points in the histogram\n - `compilation-only` benchmark the Nim compiler on the given source(s)\n - `brief` only output the statistics at the completion of the benchmark\n - `never-output` never emit anything via stdout/stderr\n - `dump-output` always print the stdout/stderr of the benchmarked program\n - `--` the following arguments are passed to the compiler and runtime. Note that if you supply `-- cpp` for compilation via C++, you will need to supply your own defines such as `-d:danger`.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisruptek%2Fgolden","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisruptek%2Fgolden","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisruptek%2Fgolden/lists"}