• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

JuliaPerf/PProf.jl: Export Julia profiles to the pprof format

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

JuliaPerf/PProf.jl

开源软件地址:

https://github.com/JuliaPerf/PProf.jl

开源编程语言:

Julia 100.0%

开源软件介绍:

PProf.jl

Build Status

Sometimes I need a hammer, sometimes I need a drill, this is a hammer-drill

using Profile
using PProf

# collect a profile
@profile peakflops()

# Export pprof profile and open interactive profiling web interface.
pprof()

This prints a link to a local webserver where you can inspect the profile you've collected. It produces a file called profile.pb.gz in the pprof format, and then opens the pprof tool in interactive "web" mode.

For more usage examples see the pprof docs: https://github.com/google/pprof/blob/master/doc/README.md

Dependencies

  • Graphviz
    • In order to use pprof's web graph view (which is one of the best parts of pprof), you need to have graphviz installed. Click the above link to install.

Usage

help?> pprof
  pprof([data, [lidict]];
          web = true, webhost = "localhost", webport = 57599,
          out = "profile.pb.gz", from_c = true, full_signatures = true, drop_frames = "",
          keep_frames = "", ui_relative_percentages = true, sampling_delay = nothing,
        )
  pprof(FlameGraphs.flamegraph(); kwargs...)

  Fetches the collected `Profile` data, exports to the `pprof` format, and (optionally) opens
  a `pprof` web-server for interactively viewing the results.
help?> @pprof
  @pprof ex

  Profiles the expression using @profile and starts or restarts the pprof() web UI with default arguments.

Calling pprof() or @pprof exports the profiling results to disk, and launches the web server in the background pointed at the results. Calling it again overwrites the results and refreshes the server, so you can reload the web-page to see your updated results. The link to the webserver is printed to your terminal, which you can then open in a browser.

If you manually modify the output profile file, you can refresh the web server without overwriting the out file by calling PProf.refresh().

Example

julia> using PProf

julia> @pprof peakflops()
"profile.pb.gz"

Main binary filename not available.
Serving web UI on http://localhost:57599

Google PProf Web View

graph

flamegraph




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
jlustigy/ExoJulia: A Julia package for fast exoplanet modeling发布时间:2022-07-09
下一篇:
sdllc/Basic-Excel-R-Toolkit发布时间:2022-07-09
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap