码迷,mamicode.com
首页 > 其他好文 > 详细

Golang pprof heap profile is empty

时间:2016-07-15 13:39:32      阅读:422      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!