{"id":17767308,"url":"https://github.com/jamiebuilds/react-performance-observer","last_synced_at":"2025-04-10T01:12:06.326Z","repository":{"id":57342399,"uuid":"133712139","full_name":"jamiebuilds/react-performance-observer","owner":"jamiebuilds","description":"Get performance measurements from React Fiber","archived":false,"fork":false,"pushed_at":"2018-05-16T19:11:54.000Z","size":36,"stargazers_count":208,"open_issues_count":1,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T01:12:00.300Z","etag":null,"topics":["debug","devtools","measurements","perf","performance","react"],"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/jamiebuilds.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}},"created_at":"2018-05-16T19:11:23.000Z","updated_at":"2025-03-07T02:37:49.000Z","dependencies_parsed_at":"2022-09-16T02:50:17.624Z","dependency_job_id":null,"html_url":"https://github.com/jamiebuilds/react-performance-observer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-performance-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-performance-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-performance-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-performance-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamiebuilds","download_url":"https://codeload.github.com/jamiebuilds/react-performance-observer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"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":["debug","devtools","measurements","perf","performance","react"],"created_at":"2024-10-26T20:46:00.888Z","updated_at":"2025-04-10T01:12:06.300Z","avatar_url":"https://github.com/jamiebuilds.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-performance-observer\n\n\u003e Get performance measurements from React Fiber\n\n## Install\n\n```sh\nyarn add --dev react-performance-observer\n```\n\n## Usage\n\n`react-performance-observer` is a small abstraction over [PerformanceObserver]\nwhich reports only the measurements that come from React and parses information\nout of the name (See [ReactDebugFiberPerf]).\n\n```js\nimport { observe } from 'react-performance-observer';\n\nobserve(measurements =\u003e {\n  console.log(measurements);\n  // [\n  //   {\n  //     entryType: \"measure\",\n  //     name: \"⚛ App [mount]\",\n  //     componentName: \"App\",\n  //     phase: \"mount\",\n  //     startTime: 281,\n  //     duration: 4,\n  //     warning: null\n  //   },\n  //   ...\n  // ]\n});\n```\n\nOr if you want to create your own `PerformanceObserver` you can use just the\n`parseEntry()` method.\n\n```js\nimport { parseEntry } from 'react-performance-observer';\n\nlet observer = new window.PerformanceObserver(list =\u003e {\n  list.getEntries().forEach(entry =\u003e {\n    console.log(parseEntry(entry)); // parsed entry or null\n  });\n});\n```\n\nThis code was largely based on [react-perf-devtool] by [@nitin42](https://github.com/nitin42).\n\n[PerformanceObserver]: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver\n[ReactDebugFiberPerf]: https://github.com/facebook/react/blob/8227e54ccf32f47e4c6bf5f30d08f84b8fed455d/packages/react-reconciler/src/ReactDebugFiberPerf.js\n[react-perf-devtool]: https://github.com/nitin42/react-perf-devtool/blob/eae41fcad84749bf37aaad6491dffc7924e84955/src/shared/parseMeasures.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Freact-performance-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiebuilds%2Freact-performance-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Freact-performance-observer/lists"}