Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

pfitzseb/ProfileCanvas.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package is intended as a drop-in replacement forProfileView.jl andProfileSVG.jl.

It exposes the HTML canvas basedprofile viewer UI used by theJulia extension for VS Code in the REPL and environments that can display HTML (like Pluto notebooks). Performance should be significantly better than SVG-based solutions, especially for very large traces.

Usage

using ProfileCanvasfunctionprofile_test(n)for i=1:n        A=randn(100,100,20)        m=maximum(A)        Am=mapslices(sum, A; dims=2)        B= A[:,:,5]        Bsort=mapslices(sort, B; dims=1)        b=rand(100)        C= B.*bendend@profviewprofile_test(1)# run once to trigger compilation (ignore this one)@profviewprofile_test(10)

On Julia 1.8 and newer you can also use profiler memory allocations with@profview_allocs/view_allocs:

@profview_allocs profile_test(10)

The controls aremouse wheel to scroll, andclick on a cell to base the zoom on it.The end result depends on the julia version, but it might be something like this:

when run from the REPL and

in aPluto notebook.

Color coding

The profiling data is color-coded to provide insights about the performance of your code:

  • Red bars represent function calls resolved at run-time, which often have a significant impact on performance. While some red is unavoidable, excessive red may indicate a performance bottleneck.
  • Yellow bars indicate a site of garbage collection, which is often triggered by memory allocation. These sites can often be optimized by reducing the amount of temporary memory allocated by your code.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5

Languages


[8]ページ先頭

©2009-2025 Movatter.jp