From 267f844811fc0f571c0fff5c5d77666318ff4b96 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Fri, 15 May 2020 12:48:27 -0700 Subject: [PATCH] docs: update docs for microbenchmarks (#37140) Update docs in the micro benchmarks to include: * How to run with no turbo inlining * Where to find the profiles in the DevTools * Best way to debug benchmarks (using the profile_in_browser rather than --inspect-brk) PR Close #37140 --- packages/core/test/render3/perf/README.md | 2 ++ packages/core/test/render3/perf/profile_in_browser.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/core/test/render3/perf/README.md b/packages/core/test/render3/perf/README.md index 561711022a..50002fc86f 100644 --- a/packages/core/test/render3/perf/README.md +++ b/packages/core/test/render3/perf/README.md @@ -80,5 +80,7 @@ To profile, append `_profile` to the target name and attach a debugger via chrom To interactively edit/rerun benchmarks use `ibazel` instead of `bazel`. To debug +- Follow the directions in `profile_in_browser.html` +OR - `yarn bazel build --config=ivy //packages/core/test/render3/perf:noop_change_detection` - `node --inspect-brk bazel-out/darwin-fastbuild/bin/packages/core/test/render3/perf/noop_change_detection.min_debug.es2015.js` \ No newline at end of file diff --git a/packages/core/test/render3/perf/profile_in_browser.html b/packages/core/test/render3/perf/profile_in_browser.html index 176a623ba8..15a4f1a179 100644 --- a/packages/core/test/render3/perf/profile_in_browser.html +++ b/packages/core/test/render3/perf/profile_in_browser.html @@ -8,7 +8,11 @@
  1. Build the benchmark using yarn bazel build //packages/core/test/render3/perf:${BENCHMARK}.min_debug.es2015.js --config=ivy
  2. Open this file using the file:// protocol and add ?benchmark=BENCHMARK to the URL.
  3. -
  4. Open debug console for details
  5. +
  6. + Note: You should likely run this in an incognito browser with the "no-turbo-inlining" flag.
    + On Chrome, the command would be /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome -incognito --js-flags="--no-turbo-inlining" +
  7. +
  8. Open debug console for details. Benchmark profiles are available in the "JavaScript Profiler" tab of Chrome DevTools.