Redux Performance Plus
This is a utility and convenience library for measuring Redux action timings. It uses performance-plus to access the browser-based performance API, with support for IE8+.
You can pass a custom action duration limit, where actions exceeding that timing limit (in ms) are passed to an onSlow
callback with relevant data.
Example Usage
;; const middlewares = ;;
Installation
$ npm install redux-performance-plus --save
Configuration
The middleware constructor takes one argument with options.
// Default configuration, no behavior; // Default configuration, log all actions; // Custom configuration, log all actions taking over 100ms;
Action Methods
The action data passed to onSlow
contains the original action (with type
, etc.), along with these methods:
actiontype // unchangedaction; // latest duration for action type, in msaction; // mean duration, in msaction; // standard deviation of mean duration, in msaction; // all measures for this action typeaction; // Percentile duration for recorded samples of this aciton type