You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: maintaining.md
+22-1
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,31 @@
27
27
28
28
## Profiling
29
29
30
+
You should first install [`iron-node`](https://github.com/s-a/iron-node) and / or [`devtool`](https://github.com/Jam3/devtool) globally:
After `iron-node` has loaded, activate the Dev Tools profiling, and then hit <kbd>Cmd</kbd> <kbd>R</kbd> to rerun the tests.
42
+
Or:
43
+
44
+
```
45
+
$ devtool node_modules/ava/profile.js <test-file>
46
+
```
47
+
48
+
Once the Dev Tools window has loaded, activate Memory or CPU profiling, and then hit <kbd>Cmd</kbd> <kbd>R</kbd> to rerun the tests.
49
+
50
+
As soon as the tests finish, stop the recording and inspect the profiler results. The [flamegraph]() can be displayed by choosing `Chart` from the drop down on the `Profiles` tab (other views include `Tree (top down)` and `Heavy (bottom up)`).
51
+
52
+
You may also want to check out the Settings page in Dev Tools and enable one or more options in the Profiling section.
53
+
54
+
##### Helpful resources
55
+
56
+
-[An introduction to Node.js debugging with `devtool`](http://mattdesl.svbtle.com/debugging-nodejs-in-chrome-devtools).
57
+
-[A video introduction to Chrome DevTools CPU and Memory profiling](https://www.youtube.com/watch?v=KKwmdTByxLk).
0 commit comments