From 172bb76964782dda07517a5e2ebf01a8fe808aad Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Mon, 19 Aug 2019 15:45:13 +0200 Subject: [PATCH] docs(ivy): update micro-benchmark instructions (#32190) PR Close #32190 --- packages/core/test/render3/perf/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/core/test/render3/perf/README.md b/packages/core/test/render3/perf/README.md index 25c8b47e78..e09461dd6e 100644 --- a/packages/core/test/render3/perf/README.md +++ b/packages/core/test/render3/perf/README.md @@ -1,11 +1,22 @@ ### Build -yarn bazel build //packages/core/test/render3/perf/{name}.min_debug.es2015.js --define=compile=aot +yarn bazel build //packages/core/test/render3/perf:{name}.min_debug.es2015.js --define=compile=aot ### Run -time node --no-turbo-inlining dist/bin/packages/core/test/render3/perf/{name}.min_debug.es2015.js +time node dist/bin/packages/core/test/render3/perf/{name}.min_debug.es2015.js ### Profile -node --no-turbo-inlining --inspect-brk dist/bin/packages/core/test/render3/perf/{name}.min_debug.es2015.js \ No newline at end of file +node --no-turbo-inlining --inspect-brk dist/bin/packages/core/test/render3/perf/{name}.min_debug.es2015.js + +then connect with a debugger (the `--inspect-brk` option will make sure that benchmark execution doesn't start until a debugger is connected and the code execution is manually resumed). + +The actual benchmark code has calls that will start (`console.profile`) and stop (`console.profileEnd`) a profiling session. + +### Notes + +In all the above commands {name} should be replaced with the actual benchmark (folder) name, ex.: +- build: `yarn bazel build //packages/core/test/render3/perf:noop_change_detection.min_debug.es2015.js --define=compile=aot` +- run: `time node dist/bin/packages/core/test/render3/perf/noop_change_detection.min_debug.es2015.js` +- profile: `node --no-turbo-inlining --inspect-brk dist/bin/packages/core/test/render3/perf/noop_change_detection.min_debug.es2015.js`