{"id":21675943,"url":"https://github.com/helpscout/stats","last_synced_at":"2025-07-04T16:06:39.481Z","repository":{"id":57115622,"uuid":"167583736","full_name":"helpscout/stats","owner":"helpscout","description":"📊Stats: Easy performance monitoring for JavaScript / React","archived":false,"fork":false,"pushed_at":"2019-03-11T21:11:05.000Z","size":1408,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-10T22:07:53.697Z","etag":null,"topics":["javascript","open-source","performance","react","stats"],"latest_commit_sha":null,"homepage":"","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/helpscout.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":"2019-01-25T17:10:22.000Z","updated_at":"2024-07-11T09:00:51.000Z","dependencies_parsed_at":"2022-08-23T00:10:58.282Z","dependency_job_id":null,"html_url":"https://github.com/helpscout/stats","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/helpscout/stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpscout%2Fstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpscout%2Fstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpscout%2Fstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpscout%2Fstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helpscout","download_url":"https://codeload.github.com/helpscout/stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpscout%2Fstats/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261193100,"owners_count":23122906,"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":["javascript","open-source","performance","react","stats"],"created_at":"2024-11-25T14:11:37.788Z","updated_at":"2025-07-04T16:06:39.459Z","avatar_url":"https://github.com/helpscout.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 Stats\n\n[![Build Status](https://travis-ci.org/helpscout/stats.svg?branch=master)](https://travis-ci.org/helpscout/stats)\n[![npm version](https://badge.fury.io/js/%40helpscout%2Fstats.svg)](https://badge.fury.io/js/%40helpscout%2Fstats)\n\n\u003e Easy performance monitoring for JavaScript / React\n\n![Stats](https://raw.githubusercontent.com/helpscout/stats/master/images/stats-demo.gif)\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [JavaScript](#javascript)\n  - [React](#react)\n- [Graphs](#graphs)\n- [Options](#options)\n- [Thanks](#thanks)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Installation\n\nAdd `stats` to your project via `npm install`:\n\n```\nnpm install --save @helpscout/stats\n```\n\n## Usage\n\n### JavaScript\n\nTo use Stats in your JavaScript project, simply import it and instantiate!\n\n```js\nimport createStats from '@helpscout/stats'\n\nconst stats = createStats()\n// Stats will automatically mount to window.document\n\n// For clean up, execute the destroy() method\nstats.destroy()\n```\n\n### React\n\nStats comes with a handy `\u003cStatsGraph /\u003e` component. To add it to your React project, import it and render it:\n\n```jsx\nimport React from 'react'\nimport {StatsGraph} from '@helpscout/stats'\n\nclass App extends React.Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        ...\n        \u003cStatsGraph /\u003e\n        ...\n      \u003c/div\u003e\n    )\n  }\n}\n\nexport default App\n```\n\n`StatsGraph` cleans up after itself if it unmounts.\n\n## Graphs\n\n- **FPS** Frames rendered in the last second. The higher the number the better.\n- **MB** MBytes of allocated memory. (Run Chrome with --enable-precise-memory-info)\n- **NODES** Number of DOM nodes in `window.document` (including iFrame nodes).\n\n## Options\n\nStats accepts a handful of options to adjust it's position and UI.\n\n| Prop     | Type              | Default  | Description                 |\n| -------- | ----------------- | -------- | --------------------------- |\n| top      | `number`/`string` | 0        | (CSS) top position.         |\n| right    | `number`/`string` | 0        | (CSS) right position.       |\n| bottom   | `number`/`string` | 0        | (CSS) bottom position.      |\n| left     | `number`/`string` | 0        | (CSS) left position.        |\n| opacity  | `number`          | 0.5      | Opacity for the Stats UI.   |\n| position | `string`          | fixed    | Position for the Stats UI.  |\n| zIndex   | `string`          | 99999999 | `z-index` for the Stats UI. |\n\nThe React `StatsGraph` uses the same options for it's `defaultProps`\n\n## Thanks\n\nThanks for [mrdoob](https://github.com/mrdoob) for his [stats.js](https://github.com/mrdoob/stats.js) library, which inspired this one!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpscout%2Fstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelpscout%2Fstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpscout%2Fstats/lists"}