{"id":13524788,"url":"https://github.com/mcollina/loopbench","last_synced_at":"2025-04-06T19:12:28.527Z","repository":{"id":2203195,"uuid":"45938287","full_name":"mcollina/loopbench","owner":"mcollina","description":"Benchmark your event loop","archived":false,"fork":false,"pushed_at":"2023-05-31T09:10:46.000Z","size":15,"stargazers_count":112,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T17:09:14.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mcollina.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}},"created_at":"2015-11-10T20:29:16.000Z","updated_at":"2025-01-13T09:09:55.000Z","dependencies_parsed_at":"2023-07-05T21:16:31.739Z","dependency_job_id":null,"html_url":"https://github.com/mcollina/loopbench","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcollina%2Floopbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcollina%2Floopbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcollina%2Floopbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcollina%2Floopbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcollina","download_url":"https://codeload.github.com/mcollina/loopbench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535519,"owners_count":20954576,"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-08-01T06:01:13.466Z","updated_at":"2025-04-06T19:12:28.489Z","avatar_url":"https://github.com/mcollina.png","language":"JavaScript","readme":"# loopbench\n\nBenchmark your event loop, extracted from [hapi](http://npm.im/hapi),\n[hoek](http://npm.im/hoek), [heavy](http://npm.im/heavy) and\n[boom](http://npm.im/boom).\n\n* [Install](#install)\n* [Example](#example)\n* [API](#api)\n* [Acknowledgements](#acknowledgements)\n* [License](#license)\n\n\u003ca name=\"install\"\u003e\u003c/a\u003e\n## Install\nTo install loopbench, simply use npm:\n\n```\nnpm i loopbench --save\n```\n\n\u003ca name=\"example\"\u003e\u003c/a\u003e\n## Example\n\nSee [example.js][example].\n\n\u003ca name=\"api\"\u003e\u003c/a\u003e\n## API\n\n  * \u003ca href=\"#constructor\"\u003e\u003ccode\u003e\u003cb\u003eloopbench()\u003c/b\u003e\u003c/code\u003e\u003c/a\u003e\n  * \u003ca href=\"#delay\"\u003e\u003ccode\u003einstance.\u003cb\u003edelay\u003c/b\u003e\u003c/code\u003e\u003c/a\u003e\n  * \u003ca href=\"#limit\"\u003e\u003ccode\u003einstance.\u003cb\u003elimit\u003c/b\u003e\u003c/code\u003e\u003c/a\u003e\n  * \u003ca href=\"#overLimit\"\u003e\u003ccode\u003einstance.\u003cb\u003eoverLimit\u003c/b\u003e\u003c/code\u003e\u003c/a\u003e\n  * \u003ca href=\"#stop\"\u003e\u003ccode\u003einstance.\u003cb\u003estop()\u003c/b\u003e\u003c/code\u003e\u003c/a\u003e\n\n-------------------------------------------------------\n\u003ca name=\"constructor\"\u003e\u003c/a\u003e\n### loopbench([opts])\n\nCreates a new instance of loopbench.\n\nOptions:\n\n* `sampleInterval`: the interval at which the eventLoop should be\n  sampled, defaults to `5`.\n* `limit`: the maximum amount of delay that is tollerated before\n  [`overLimit`](#overLimit) becomes true, and the `load` event is\n  emitted, defaults to `42`.\n\nEvents:\n\n* `load`, emitted when `instance.delay \u003e instance.limit`\n* `unload`, emitted when `overLimit` goes from `true` and `false`\n\n-------------------------------------------------------\n\u003ca name=\"delay\"\u003e\u003c/a\u003e\n### instance.delay\n\nThe delay in milliseconds (and fractions) from the expected run.\nIt might be negative (in older nodes).\n\n-------------------------------------------------------\n\u003ca name=\"limit\"\u003e\u003c/a\u003e\n### instance.limit\n\nThe maximum amount of delay that is tollerated before\n[`overLimit`](#overlimit) becomes true, and the `load` event is\nemitted.\n\n-------------------------------------------------------\n\u003ca name=\"overLimit\"\u003e\u003c/a\u003e\n### instance.overLimit\n\nIs `true` if the `instance.delay \u003e instance.limit`.\n\n-------------------------------------------------------\n\u003ca name=\"stop\"\u003e\u003c/a\u003e\n### instance.stop()\n\nStops the sampling.\n\n\u003ca name=\"license\"\u003e\u003c/a\u003e\n## License\n\nCopyright Matteo Collina 2015-2022, Licensed under [MIT][].\n\n[MIT]: ./LICENSE\n[example]: ./example.js\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcollina%2Floopbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcollina%2Floopbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcollina%2Floopbench/lists"}