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: perf.slide
+95-5Lines changed: 95 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,7 @@ Demo: word length count
93
93
# -benchmem, b.ReportAllocs
94
94
# b.Errorf, b.Logf, -v
95
95
# danger: these skew benchmarking! demo with ReportAllocs
96
+
# and wow, reflect.DeepEqual is expensive!
96
97
# b.ResetTimer, b.StopTimer, b.StartTimer
97
98
# show Go 1.4 vs Go tip (1.5)
98
99
@@ -141,6 +142,8 @@ Demo: ngram
141
142
# cpu is efficient, can run on live production server, memory less so
142
143
# different kinds of profiling interfere with each other
143
144
145
+
# NetBSD also has (had?) broken profiling
146
+
144
147
145
148
* CPU profiling
146
149
@@ -187,13 +190,104 @@ Demo: ascii
187
190
- Don't run tests when profiling.
188
191
- If the output doesn't make sense, poke around or ask for help.
189
192
190
-
# pprof has a crappy UI
193
+
# pprof has a crappy UI. Live with it. :(
191
194
192
195
193
196
* Block profiling
194
197
195
198
Demo: ngram
196
199
200
+
# easy demo: -blockprofile=
201
+
# discuss -blockprofilerate, -memprofilerate
202
+
# there is a way to change cpu profile rate in runtime package but too fast can't happen (OS support, expense of walking the stack) and the default is pretty good
0 commit comments