Measurer
Simple performance helper for the Browser and Node.js.
Feature
- Measures the execution time of a method
- Supports decorators
- Uses
timerify
in Node.js,performance.measure
in Browser
Install
$ npm i measurer
Usage
; @ // just add it here { const len = 64 * 1024 * 1024; const b = Buffer; let s = ''; for let i = 0; i < 256; ++i s += String; for let i = 0; i < 64 * 1024 * 1024; i += 256 b; for let i = 0; i < 32; ++i b; } const robot = ; roboot; // output: name: calc | duration: 3.047741ms
Measure Component's render
You can see samples.
Common Component
It is possible to write to common components because both Browser and Node.js are supported.
;; Component @ { return <ul>...100000</ul>; }
Client
;;; ReactDOM;// output: name: render | duration: 353.09999994933605 ms
Server
;;; ;// output: name: render | duration: 358.03561 ms