{"id":19334189,"url":"https://github.com/eugenehp/react-native-benchmark","last_synced_at":"2025-06-29T11:32:45.580Z","repository":{"id":57335747,"uuid":"359024721","full_name":"eugenehp/react-native-benchmark","owner":"eugenehp","description":"React Native benchmarking library inspired by benchmark.js and written in TypeScript.","archived":false,"fork":false,"pushed_at":"2021-04-18T06:09:44.000Z","size":58,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-27T17:47:46.809Z","etag":null,"topics":["android","benchmark","ios","performance","react-native","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/eugenehp/react-native-benchmark#readme","language":"TypeScript","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/eugenehp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-18T02:15:49.000Z","updated_at":"2023-06-02T21:02:33.000Z","dependencies_parsed_at":"2022-09-14T18:50:29.986Z","dependency_job_id":null,"html_url":"https://github.com/eugenehp/react-native-benchmark","commit_stats":null,"previous_names":["eugenehp/benchmark-ts"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/eugenehp/react-native-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenehp%2Freact-native-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenehp%2Freact-native-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenehp%2Freact-native-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenehp%2Freact-native-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eugenehp","download_url":"https://codeload.github.com/eugenehp/react-native-benchmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenehp%2Freact-native-benchmark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262586368,"owners_count":23332846,"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":["android","benchmark","ios","performance","react-native","typescript"],"created_at":"2024-11-10T02:57:49.248Z","updated_at":"2025-06-29T11:32:45.539Z","avatar_url":"https://github.com/eugenehp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-benchmark\n\n[![GitHub license](https://img.shields.io/github/license/eugenehp/react-native-benchmark.svg?color=blue\u0026style=for-the-badge)](./LICENSE)\n[![npm](https://img.shields.io/npm/v/react-native-benchmark.svg?color=green\u0026style=for-the-badge)](https://www.npmjs.com/package/react-native-benchmark)\n[![npm downloads](https://img.shields.io/npm/dw/react-native-benchmark.svg?label=npm%20downloads\u0026style=for-the-badge)](https://npmcharts.com/compare/react-native-benchmark?minimal=true)\n[![total npm downloads](https://img.shields.io/npm/dt/react-native-benchmark.svg?label=total%20npm%20downloads\u0026style=for-the-badge)](https://npmcharts.com/compare/react-native-benchmark?minimal=true)\n[![GitHub watchers](https://img.shields.io/github/watchers/eugenehp/react-native-benchmark.svg?style=for-the-badge)](https://github.com/eugenehp/react-native-benchmark/watchers)\n[![GitHub stars](https://img.shields.io/github/stars/eugenehp/react-native-benchmark.svg?label=GitHub%20stars\u0026style=for-the-badge)](https://github.com/eugenehp/react-native-benchmark/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/eugenehp/react-native-benchmark.svg?style=for-the-badge)](https://github.com/eugenehp/react-native-benchmark/network/members)\n[![open bugs](https://img.shields.io/github/issues-raw/eugenehp/react-native-benchmark/bug.svg?color=d73a4a\u0026label=open%20bugs\u0026style=for-the-badge)](https://github.com/eugenehp/react-native-benchmark/issues?utf8=%E2%9C%93\u0026q=is%3Aissue+is%3Aopen+label%3Abug)\n[![total open issues](https://img.shields.io/github/issues-raw/eugenehp/react-native-benchmark.svg?label=total%20open%20issues\u0026style=for-the-badge)](https://github.com/eugenehp/react-native-benchmark/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/eugenehp/react-native-benchmark.svg?style=for-the-badge)](https://github.com/eugenehp/react-native-benchmark/pulls)\n\n[![Packagephobia](https://badgen.net/packagephobia/install/react-native-benchmark)](https://packagephobia.com/result?p=react-native-benchmark)\n[![Bundlephobia](https://badgen.net/bundlephobia/min/react-native-benchmark)](https://bundlephobia.com/result?p=react-native-benchmark@2.0.0)\n\nReact Native  benchmarking library inspired by [benchmark.js](https://github.com/bestiejs/benchmark.js) and written in TypeScript.\n\n\u003cimg width=\"568\" alt=\"Screen Shot 2021-04-17 at 19 16 06\" src=\"https://user-images.githubusercontent.com/1857263/115132008-6657f400-9fb1-11eb-934e-66635056e430.png\"\u003e\n\n\u003cspan style=\"color:red\"\u003e**Warning**: This library is work in progess. Use it at your own risk!\u003c/span\u003e\n\n## Installation\n\n```shell\nnpm i -s benchmark-ts\n```\n\n## Usage\n\n```Typescript\n// example/index.ts\nimport { EventType, Suite } from \"../src\";\n\nconst suite = new Suite;\n\nsuite.add('RegExp#test', () =\u003e {\n  /o/.test('Hello World!');\n})\n.add('String#indexOf', () =\u003e {\n  'Hello World!'.indexOf('o') \u003e -1;\n})\n.add('String#match', () =\u003e {\n  !!'Hello World!'.match(/o/);\n})\n.on(EventType.CYCLE, (event) =\u003e {\n  // console.log(event.type, event.target.times);\n})\n.on(EventType.COMPLETE, (event) =\u003e {\n  // const s:Suite = event.target as Suite\n  console.log(suite.toString())\n})\n.run({async: true});\n```\n\n## Example output\n\nOutput for `suite.toString()` method.\n\n```plain\nRegExp#test - 2211577 ops/sec ± 2.10%\nString#indexOf - 2335987 ops/sec ± 1.96%\nString#match - 2046868 ops/sec ± 0.88%\n```\n\nOutput for `suite.toJSON()` method.\n\n```JSON\n{\n  'RegExp#test': {\n    moe: 46334.779732633404,\n    mean: 2211577.4,\n    rme: 2.0951009778194245,\n    deviation: 37322.66469908063,\n    variance: 1392981300.2399998,\n    sem: 16691.203073715205,\n    sample: [ 2138299, 2234914, 2228720, 2217517, 2238437 ]\n  },\n  'String#indexOf': {\n    moe: 45836.23559201627,\n    mean: 2335986.6,\n    rme: 1.962178875170614,\n    deviation: 36921.08739785436,\n    variance: 1363166694.6399999,\n    sem: 16511.612244962635,\n    sample: [ 2265366, 2353147, 2372154, 2338449, 2350817 ]\n  },\n  'String#match': {\n    moe: 18031.048282470998,\n    mean: 2046867.8,\n    rme: 0.880909274280977,\n    deviation: 14524.009245384002,\n    variance: 210946844.56,\n    sem: 6495.33439570281,\n    sample: [ 2048837, 2035629, 2025664, 2064410, 2059799 ]\n  }\n}\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## Sponsorship\n\nThank you to our sponsors:\n\n[\u003cimg width=\"300px\" src=\"https://user-images.githubusercontent.com/1857263/114124204-c4e1eb80-98a8-11eb-80ab-64683c24bbc5.png\" alt=\"Reactive Lions™\" target=\"_blank\"\u003e](https://www.reactivelions.com)\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright (c) 2021 Eugene Hauptmann\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenehp%2Freact-native-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugenehp%2Freact-native-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenehp%2Freact-native-benchmark/lists"}