Difference between revisions of "Go tool pprof"

From wikieduonline
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
  
 +
* Get stack trace: <code>[[kill -SIGUSR1]] <pid></code>, get trace and stop: <code>[[kill -6]]</code> <pid>
 +
* Get [[CPU profiling]]: add <code>[[--pprof]]</code> 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 <code>--pprof</code> flag run <code>go tool pprof -inuse_space -png  http://127.0.0.1:6060/debug/pprof/heap > mem.png</code>
  
[[go tool]] [[pprof]]
+
== Related ==
 +
* <code>[[go tool]] [[pprof]]</code>
 +
* [[kill]]
 +
 
 +
== See also ==
 +
* {{pprof}}
 +
* {{profiling}}
 +
* {{go tool}}
 +
 
 +
[[Category:Computing]]

Latest revision as of 09:08, 8 August 2024

Related[edit]

See also[edit]

Advertising: