首页 > 其他 > 详细

Golang pprof heap profile is empty

时间:2016-07-15 13:39:10      阅读:1019      评论:0      收藏:0      [点我收藏+]

Q:

When you use `go tool pprof` get heap data, profile is empty.

A:

The default sampling rate is 1 sample per 512KB of allocated memory.

So If you application use little memory, the profiling can‘t sampling any data.

You can change runtime.MemProfileRate to reduce sampling rate.

The easy way is add Environment Variables GODEBUG="memprofilerate=1", before run you application.

 

[via]

[via]

[via]

Golang pprof heap profile is empty

原文:http://www.cnblogs.com/eshizhan/p/5672976.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!