{"id":21961869,"url":"https://github.com/trapcodeio/benchmark","last_synced_at":"2026-05-08T11:12:49.490Z","repository":{"id":57700499,"uuid":"501216849","full_name":"trapcodeio/benchmark","owner":"trapcodeio","description":"My Personal Benchmark kit","archived":false,"fork":false,"pushed_at":"2022-06-08T16:04:12.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T05:34:53.557Z","etag":null,"topics":["benchmark","javascript","node"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/trapcodeio.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}},"created_at":"2022-06-08T11:13:39.000Z","updated_at":"2023-01-14T13:04:57.000Z","dependencies_parsed_at":"2022-09-26T21:10:50.070Z","dependency_job_id":null,"html_url":"https://github.com/trapcodeio/benchmark","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/trapcodeio%2Fbenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fbenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fbenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fbenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapcodeio","download_url":"https://codeload.github.com/trapcodeio/benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245017556,"owners_count":20547833,"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":["benchmark","javascript","node"],"created_at":"2024-11-29T10:19:26.285Z","updated_at":"2026-05-08T11:12:44.465Z","avatar_url":"https://github.com/trapcodeio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Personal Benchmark Kit\n\nThis packages only provides semantic helper functions for the original [Benchmark](https://npmjs.com/package/benchmark)\n\n## Installation\n```sh\nnpm i @trapcode/benchmark\n# OR\nyarn add @trapcode/benchmark\n```\n\n## Functions\nList of functions available in this package.\n\n- [benchmarkFunctions](#benchmarkfunctions)\n\n\n\n### benchmarkFunctions\nThis function benchmarks an array/record of functions given to it.\n\n#### Syntax \n```javascript\nimport {benchmarkFunctions} from \"@trapcode/benchmark\"\n\nbenchmarkFunctions(FunctionsArray, options)\n\nbenchmarkFunctions(FunctionsObject, options)\n\nbenchmarkFunctions(Name, FunctionsArray | FunctionsObject, options)\n```\n\n#### Example\n```javascript\nimport {benchmarkFunctions} from \"@trapcode/benchmark\"\n\nfunction One() {\n    return 1 + 1;\n}\n\nfunction Two() {\n    // run one 100 times\n    let i = 100;\n    while (--i) One();\n}\n\nfunction Three() {\n    // run two 100 times\n    let i = 100;\n    while (--i) Two();\n}\n\n// An array of functions\nbenchmarkFunctions([One, Two, Three]).run();\n\n// Or an object of functions.\nbenchmarkFunctions({ One, Two, Three }).run();\n```\n\nResult\n```js\nOne x 894,565,407 ops/sec ±1.12% (84 runs sampled)\nTwo x 16,723,630 ops/sec ±0.89% (90 runs sampled)\nThree x 190,309 ops/sec ±0.46% (95 runs sampled)\nFastest is [One]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fbenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapcodeio%2Fbenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fbenchmark/lists"}