If you use
renderTime, you can get benefit by using this lib with react-performance-testing. This lib is created to improve DX for react-performance-test users. You can execute all test at once by using this library.
Table of Contents
npm install --save-dev performance-testing-cli
yarn add --dev performance-testing-cli
You can test render time at once. But you should write one test case in one file. Because node.js has feature called inline caching. Inline caching is make our code be fast but we can not measure render time correctly.
But this library resolve this problem by executing test in another process.
You can use as below.
perf --cmd='jest' --root='dir'
Note: You need to separate directory to generally test and
You can check example here.
cmd(required) ... Specify your test command like
root(required) ... Specify your root directory you want to test performance.
match ... Specify your regexp. Using micromatch. default:
If you specify file path as below, you can test one by one.
perf --cmd='jest' ./dir/filename.js
Even if you specify
filename.js has priority.
perf --cmd='jest' --root='rootDir' ./dir/filename.js