英文:
Can't see all methods with go pprof
问题
我正在使用go pprof来对我的应用程序进行性能分析,我已经按照下面的教程进行了操作 -
http://saml.rilspace.org/profiling-and-creating-call-graphs-for-go-programs-with-go-tool-pprof
我的性能分析的"--text"结果如下 -
总共: 48个样本
48 100.0% 100.0% 48 100.0% runtime.mach_semaphore_wait
0 0.0% 100.0% 48 100.0% System
为了获取应用程序的完整性能分析结果,我应该怎么做?
(通常情况下,我的应用程序使用go-imap和json)
英文:
I am using go pprof to profile my application, I have followed the next tutorial -
http://saml.rilspace.org/profiling-and-creating-call-graphs-for-go-programs-with-go-tool-pprof
And my "--text" result of my profiling is -
> Total: 48 samples
> 48 100.0% 100.0% 48 100.0% runtime.mach_semaphore_wait
> 0 0.0% 100.0% 48 100.0% System
What should I do in order to get the full profiling result of the application?
(Generaly my application works with go-imap and json)
答案1
得分: 2
pprof
会定期对你的程序进行快照。如果在pprof
进行快照时,某些方法不在堆栈上,它们将不会出现在结果中。
这意味着你的方法在堆栈上的时间很短,因此它们不是瓶颈。或者你没有运行足够长时间的性能分析,所以它没有产生足够的样本。
英文:
pprof
takes snapshots of your program at regular interval. If some methods aren't currently on the stack when pprof
takes the snapshot, they won't appear in the results.
Which means that your methods don't appear for very long on the stack - thus they aren't a bottleneck. Or you don't run your profiling for long enough, so it doesn't produce enough samples.
答案2
得分: 0
也许你的问题类似于https://code.google.com/p/go/issues/detail?id=6047
Alex
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论