All Projects → AvraamMavridis → redux-perf-middleware

AvraamMavridis / redux-perf-middleware

Licence: other
Redux performance middleware, Measure the time that the actions need to change the state

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to redux-perf-middleware

Membrain
🧠 Type-safe memory units
Stars: ✭ 53 (+1.92%)
Mutual labels:  measure
Sparkling Graph
SparklingGraph provides easy to use set of features that will give you ability to proces large scala graphs using Spark and GraphX.
Stars: ✭ 139 (+167.31%)
Mutual labels:  measure
Distancemeasure
📷 An android demo which can measure the distance from user to something while taking photos ( Android 拍照测距 )
Stars: ✭ 185 (+255.77%)
Mutual labels:  measure
Indriya
JSR 385 - Reference Implementation
Stars: ✭ 74 (+42.31%)
Mutual labels:  measure
Hyperion Android
App Debugging & Inspection Tool for Android
Stars: ✭ 1,778 (+3319.23%)
Mutual labels:  measure
Funie Gan
Fast underwater image enhancement for Improved Visual Perception. #TensorFlow #PyTorch
Stars: ✭ 155 (+198.08%)
Mutual labels:  measure
Context Switch
Comparison of Rust async and Linux thread context switch time.
Stars: ✭ 483 (+828.85%)
Mutual labels:  measure
ARGoal
Get more goals. | Virtual Goals & Goal Distance | App Doctor Hu
Stars: ✭ 14 (-73.08%)
Mutual labels:  measure
Speed Measure Webpack Plugin
⏱ See how fast (or not) your plugins and loaders are, so you can optimise your builds
Stars: ✭ 1,980 (+3707.69%)
Mutual labels:  measure
Cheap Ruler Go
📏 cheapruler in Go: fast geodesic measurements
Stars: ✭ 176 (+238.46%)
Mutual labels:  measure
Mapbox Gl Controls
Stars: ✭ 93 (+78.85%)
Mutual labels:  measure
Cohesion
A tool for measuring Python class cohesion.
Stars: ✭ 129 (+148.08%)
Mutual labels:  measure
Hyperion Ios
In-app design review tool to inspect measurements, attributes, and animations.
Stars: ✭ 1,964 (+3676.92%)
Mutual labels:  measure
String Pixel Width
Blazingly fast measure string width in pixels on the server in Javascript (Node.Js)
Stars: ✭ 65 (+25%)
Mutual labels:  measure
Measurearkit
An example of measuring app with ARKit in iOS 11
Stars: ✭ 220 (+323.08%)
Mutual labels:  measure
Unitsnet
Makes life working with units of measurement just a little bit better.
Stars: ✭ 641 (+1132.69%)
Mutual labels:  measure
Unit Api
Units of Measurement API
Stars: ✭ 140 (+169.23%)
Mutual labels:  measure
jetty-load-generator
jetty-project.github.io/jetty-load-generator/
Stars: ✭ 62 (+19.23%)
Mutual labels:  measure
React Native Text Size
Measure text accurately before laying it out and get font information from your App.
Stars: ✭ 238 (+357.69%)
Mutual labels:  measure
Stereo Vision
This program has been developed as part of a project at the University of Karlsruhe in Germany. The final purpose of the algorithm is to measure the distance to an object by combining two webcams and use them as a Stereo Camera.
Stars: ✭ 160 (+207.69%)
Mutual labels:  measure

redux-perf-middleware

npm version CocoaPods semantic-versioning

Measure the time that the actions need to change the state

Install

NPM

Usage

import perflogger from 'redux-perf-middleware';

const createStoreWithMiddleware = applyMiddleware( perflogger )(createStore);
const store = createStoreWithMiddleware(reducer);

This project adheres to Semantic Versioning.

Example

Dumb Reducer

function slow(){
  let sum;
  for(let i = 0; i< 10000; i++){
    for(let j = 0; j< 10000; j++)
    {
      sum = i+j;
    }
  }
  return sum;
}


export const Elements = function ( state = {}, action ) {

  switch ( action.type )
  {
    case 'SLOW':
      return slow();

    default:
      return state;
  }
};

Dumb Component

 import React, { Component } from 'react';
 import { connect } from 'react-redux';

class Input extends Component {
  /**
   * Renders the markup for the topbar
   */
  render() {
    const { dispatch } = this.props;
    return (
        <input onKeyDown={ () => dispatch({ type: 'SLOW' })} />
    );
  }
};

const selector = function( { default: elements } ){
  return elements;
}

export default connect(selector)( Input );

On every keydown Redux will dispatch the action with type SLOW, and in the console the middleware will log something like:

perflogger

Or check the sample app

Contributing

Feel free to open issues, make suggestions or send PRs. This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.

Contact

Twitter: @avraamakis

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].