const timing = store => next => action => { performance.mark(`${action.type}_start`); let result = next(action); performance.mark(`${action.type}_end`); performance.measure( `${action.type}`, `${action.type}_start`, `${action.type}_end` ); return result; };