已经尝试对我们要优化的部分服务器代码进行pprof转储。我没有使用net/http/pprof
,而是依靠runtime/pprof
。我的整个设置正常运行,并且可以在服务器计算机上使用pprof转储。
但是,当我scp
将pprof转储到本地计算机时-为了使用web
,因为我不想在服务器上安装graphviz,pprof会开始向我显示此警告:>
Local symbolization failed for contacts: open /home/deploy/amigo/bin/contacts: no such file or directory
Some binary filenames not available. Symbolization may be incomplete.
Try setting PPROF_BINARY_PATH to the search path for local binaries.
File: contacts
Type: cpu
Time: May 8, 2019 at 3:27pm (IST)
Duration: 1.06s, Total samples = 1.07s (101.25%)
Entering interactive mode (type "help" for commands, "o" for options)
我从服务器复制了原始bin
,然后尝试设置PPROF_BINARY_PATH
。但这仍然无济于事。我在这里做错了什么?