{"id":18657888,"url":"https://github.com/lightsofapollo/mocha-benchmark","last_synced_at":"2025-10-05T01:18:11.676Z","repository":{"id":8591452,"uuid":"10225933","full_name":"lightsofapollo/mocha-benchmark","owner":"lightsofapollo","description":"mocha + benchmark integration for (mostly) automated performance and version comparison tests.","archived":false,"fork":false,"pushed_at":"2013-05-22T22:37:37.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-27T15:12:43.198Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightsofapollo.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":"2013-05-22T17:42:05.000Z","updated_at":"2017-01-18T03:53:37.000Z","dependencies_parsed_at":"2022-09-23T01:50:51.671Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/mocha-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/lightsofapollo%2Fmocha-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fmocha-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fmocha-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fmocha-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/mocha-benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239475960,"owners_count":19645041,"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-11-07T07:30:17.433Z","updated_at":"2025-10-05T01:18:06.627Z","avatar_url":"https://github.com/lightsofapollo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mocha + Benchmark integration\n\nDesigned as a simple wrapper around benchmark.js.\nThe initial design in ICAL.js was intended to let us test multiple\nversions of ICAL.js under the same set of performance tests to ensure\nperformance gains between versions.\n\n## Setup\n\n```js\n/* we often use tdd mocha adapters so those are the defaults */\n\nvar perf = require('mocha-benchmark').create({\n  Benchmark: Benchmark || require('benchmark')\n  versions: [\n    /* order can be important when we introduce test failing options */\n    ['previous', libGlobal],\n    ['latest', libGlobal]\n  ],\n  /* could be describe */\n  suite: suite,\n  /* or it */\n  test: test,\n});\n\n// perf.suite only runs the last version (usually your latest)\nperf.suite('libGlobal', function(perf, libGlobal) {\n  perf.test('my lib should be fast', function() {\n    libGlobal.doStuff();\n  });\n  \n  // all tests inside compare run for each version\n  perf.compare(function(perf, libGlobal) {\n    perf.test('my lib should be faster', function() {\n      // libGlobal will be previous then latest\n    });\n  });\n});\n```\n\n## Development\n\n```sh\nnpm install .\n```\n\n### For node\n\njust run `npm test`\n\n### For the browser\n\n - start server `make test-server`\n - go to: localhost:8789/test-agent/\n - run `make test-browser` \n \n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Sahaja James Lal\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fmocha-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Fmocha-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fmocha-benchmark/lists"}