Difference between revisions of "Go tool pprof"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
  
 +
* Get stack trace: <code>[[kill -SIGUSR1]] <pid></code>, get trace and stop: [[kill -6]] <pid>
 +
* Get [[CPU profiling]]: add [[--pprof]] flag run <code>[[go tool pprof]] -png  http://127.0.0.1:6060/debug/pprof/profile\?seconds\=20 > cpu.png</code>
 +
* Get [[RAM profiling]]: add --pprof flag run <code>go tool pprof -inuse_space -png  http://127.0.0.1:6060/debug/pprof/heap > mem.png</code>
  
<code>[[go tool]] [[pprof]]</code>
+
== Related ==
 
+
* <code>[[go tool]] [[pprof]]</code>
[[kill]]
+
* [[kill]]
  
 
== See also ==
 
== See also ==

Revision as of 09:07, 8 August 2024

Related

See also

Advertising: