{"id":22505352,"url":"https://github.com/azer/measure-time","last_synced_at":"2025-08-03T11:33:13.138Z","repository":{"id":19872670,"uuid":"23136497","full_name":"azer/measure-time","owner":"azer","description":"create benchmark suites and see the time consumption per given functions.","archived":false,"fork":false,"pushed_at":"2014-08-24T18:47:06.000Z","size":152,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-15T03:09:38.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/azer.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":"2014-08-20T05:05:05.000Z","updated_at":"2019-03-29T02:48:15.000Z","dependencies_parsed_at":"2022-08-26T16:31:21.467Z","dependency_job_id":null,"html_url":"https://github.com/azer/measure-time","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/azer%2Fmeasure-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fmeasure-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fmeasure-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fmeasure-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azer","download_url":"https://codeload.github.com/azer/measure-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228540841,"owners_count":17934031,"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-12-07T00:17:46.364Z","updated_at":"2024-12-07T00:17:47.194Z","avatar_url":"https://github.com/azer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## measure-time\n\nCreate benchmark suites and see the time consumption per given functions.\n\n![](https://i.cloudup.com/6QcQ_Oyq76.png)\n\n## Install\n\n```bash\n$ npm install measure-time\n```\n\n## Usage\n\nPass functions to measure-time with a title:\n\n```js\nvar time = require('measure-time')\n\ntime('testing', function (done) {\n  // ...\n})\n```\n\nOnce everything your module is defined, all functions you defined will be called\nwith a done function that should be called once the function is done its job:\n\n```js\nvar time = require('measure-time')\n\ntime('do something', function (done) { // done can be called also as \"t\" to mock tape\n  dosomething()\n  done()\n});\n\ntime('do something async', function (done) {\n  doSomethingAsync(done)\n})\n```\n\nOnce you write a module like above, you can run it like a regular Node module:\n\n```bash\n$ node example\n```\n\nIt'll run the functions you passed for 9999 times by default. You can choose how many times you want to run by:\n\n```bash\n$ node example -t 12345 # or: --times 123455\n```\n\nAnd it'll give an output like the screenshot on top. See the `example.js` in the repo\nfor another example.\n\nTo see all the command-line options, pass -h or --help:\n\n```bash\n$ node example --help\n```\n\nOr see `docs/man` in this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Fmeasure-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazer%2Fmeasure-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Fmeasure-time/lists"}