{"id":18335288,"url":"https://github.com/bhovhannes/redux-profiler","last_synced_at":"2025-04-06T04:34:02.757Z","repository":{"id":33153053,"uuid":"150166092","full_name":"bhovhannes/redux-profiler","owner":"bhovhannes","description":"A Redux store enhancer which uses User Timing API to profile redux actions and time spent on notifying store listeners","archived":false,"fork":false,"pushed_at":"2024-04-14T08:38:41.000Z","size":3550,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T09:53:44.547Z","etag":null,"topics":["chrome-devtools","profiler","redux","store-enhancer","user-timing"],"latest_commit_sha":null,"homepage":"","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/bhovhannes.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-09-24T20:43:33.000Z","updated_at":"2024-04-19T23:29:02.462Z","dependencies_parsed_at":"2023-12-23T04:21:17.196Z","dependency_job_id":"12878d60-fe48-41bb-8fa8-9011a6d66000","html_url":"https://github.com/bhovhannes/redux-profiler","commit_stats":{"total_commits":880,"total_committers":5,"mean_commits":176.0,"dds":"0.18295454545454548","last_synced_commit":"00ba7ee513fcc7fa26b6b020505b629a9b6ed2a1"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhovhannes%2Fredux-profiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhovhannes%2Fredux-profiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhovhannes%2Fredux-profiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhovhannes%2Fredux-profiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhovhannes","download_url":"https://codeload.github.com/bhovhannes/redux-profiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247435043,"owners_count":20938530,"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":["chrome-devtools","profiler","redux","store-enhancer","user-timing"],"created_at":"2024-11-05T19:54:33.644Z","updated_at":"2025-04-06T04:34:02.419Z","avatar_url":"https://github.com/bhovhannes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-profiler\n\n[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Coverage][codecov-image]][codecov-url]\n\nA Redux [store enhancer](https://redux.js.org/glossary#store-enhancer) which uses User Timing API to profile Redux actions and time spent on notifying store listeners\n\n## How to install\n\n```bash\nnpm install redux-profiler --save\n```\n\n## Usage\n\n```javascript\nimport { createStore } from 'redux'\nimport profileStore from 'redux-profiler'\n\nfunction todos(state = [], action) {\n    switch (action.type) {\n        case 'ADD_TODO':\n            return state.concat([action.text])\n        default:\n            return state\n    }\n}\n​\nconst store = createStore(todos, ['Use Redux'], profileStore())\n```\n\nYou can also combine it with Redux middleware:\n\n```javascript\nimport { createStore, compose } from 'redux'\nimport { thunk } from 'redux-thunk'\nimport profileStore from 'redux-profiler'\n\nfunction todos(state = [], action) {\n    switch (action.type) {\n        case 'ADD_TODO':\n            return state.concat([action.text])\n        default:\n            return state\n    }\n}\n​\nconst store = createStore(\n    todos,\n    ['Use Redux'],\n    compose(\n        profileStore(),\n        thunk\n    )\n)\n```\n\nor if you have multiple middlewares:\n\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport { thunk } from 'redux-thunk'\nimport profileStore from 'redux-profiler'\n\nfunction todos(state = [], action) {\n    switch (action.type) {\n        case 'ADD_TODO':\n            return state.concat([action.text])\n        default:\n            return state\n    }\n}\n\n/**\n * Logs all actions and states after they are dispatched.\n */\nconst logger = store =\u003e next =\u003e action =\u003e {\n    console.group(action.type)\n    console.info('dispatching', action)\n    let result = next(action)\n    console.log('next state', store.getState())\n    console.groupEnd()\n    return result\n}\n​\nconst store = createStore(\n    todos,\n    ['Use Redux'],\n    compose(\n        profileStore(),\n        applyMiddleware(\n            thunk,\n            logger\n        )\n    )\n)\n```\n\n## License\n\nMIT (http://www.opensource.org/licenses/mit-license.php)\n\n[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat\n[license-url]: LICENSE\n[npm-url]: https://www.npmjs.org/package/redux-profiler\n[npm-version-image]: https://img.shields.io/npm/v/redux-profiler.svg?style=flat\n[npm-downloads-image]: https://img.shields.io/npm/dm/redux-profiler.svg?style=flat\n[codecov-url]: https://codecov.io/gh/bhovhannes/redux-profiler\n[codecov-image]: https://codecov.io/gh/bhovhannes/redux-profiler/branch/master/graph/badge.svg?token=iJvUUKrgzB\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhovhannes%2Fredux-profiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhovhannes%2Fredux-profiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhovhannes%2Fredux-profiler/lists"}