ProfileSVG.view
and ProfileSVG.save
have optional keyword arguments for specifying the SVG styles.
The yflip
option inverts the depth direction. It defaults to false
and a "flame" graph with upward depth will be rendered. By setting yflip
to true
, a "icicle" graph with downward depth will be rendered.
ProfileSVG.view(yflip=true)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
The maxdepth
option limits the maximum number of the rendered rows of graph. The frames deeper than maxdepth
(i.e. away from the root) will be truncated.
The maxframes
option limits the maximum number of the rendered frames. Since the frames are rendered in order of depth-first search, the frames to the right tend to be omitted.
When maxdepth
and/or maxframes
are reached, warnings will be displayed.
ProfileSVG.view(maxdepth=7, maxframes=12)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
The graphs with many frames require a lot of memory and CPU resources, especially when using interactive features. Instead of raising the maxframes
option, consider reducing the graph size using the filter
option etc.
The width
and height
options specify the size of the SVG image in pixels. However, the actual display scale depends on the viewer.
If you set the height
to 0
, it will be calculated automatically according to the graph. As shown below, cropping can occur when the height of the graph exceeds the manually specified height
. When the interactive feature is available, you can display the cropped area by dragging the graph.
ProfileSVG.view(width=400, height=200)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
The raoundradius
option specifies the rounding radius of the corners of each frame in pixels.
ProfileSVG.view(roundradius=6)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
By setting roundradius
to 0
, the size of the output SVG file can be reduced slightly.
The font
option specifies the font family names for texts. This setting is used as the CSS font-family property, i.e. you can use a comma-separated list and quotes are required around the names which are not valid CSS identifiers.
The fontsize
option specifies the font size in pixels.
Note that the actual rendering results depend on the viewer.
ProfileSVG.view(font="'Times New Roman', serif", fontsize=16)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
By setting font
to "system-ui"
, "ui-serif"
, "ui-sans-serif"
, etc., the default user interface font may be used.
The notext
option specifies the visibility of overlaid texts on the frames. If the notext
is true
, the texts will be hidden by the interactive feature and the rendering load is significantly reduced.
ProfileSVG.view(notext=true)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
Even if you set notext
to true
, the text data themselves will be output, and the texts will be displayed in non-interactive mode, i.e. as a still image.
The timeunit
option specifies the time unit for displaying the duration (span) of active block. One of the following symbols is available for timeunit
:
:none
(default)disabling the duration display :s
, :ms
, :us
, or :µs
using the physical time unit others (e.g. :ticks
)using the discrete sampling count The delay
option specifies the delay between backtraces, in seconds. The value will be used for the conversion from the discrete sampling count to the physical time. If a non-positive number is specified, the current setting in the return value of Profile.init()
will be used.
ProfileSVG.view(timeunit=:ticks)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
Profile.init(delay=1e-4)
ProfileSVG.view(timeunit=:ms)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
ProfileSVG.view(timeunit=:µs, delay=3e-4)
Profile results
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407
The physical time displayed is an approximate value, and does not generally match the measurement time by @time
etc. The discrepancies may also occur if the profiling environment and the viewing environment are different.
The title
option specifies the title (caption) of the graph.
You can specify the default values for options with ProfileSVG.set_default
.
You can also reset the settings with ProfileSVG.init
.
ProfileSVG.set_default(StackFrameCategory(), roundradius=0, title="<default>",
font="system-ui", fontsize=8)
ProfileSVG.view(width=300)
<default>
in :-1
eval in boot.jl:331
profile_test in REPL[2]:3
randn in normal.jl:190
randn in normal.jl:184
randn! in normal.jl:173
setindex! in array.jl:826
randn in normal.jl:167
randn in normal.jl:40
rand in Random.jl:253
rand in generation.jl:119
rand in Random.jl:253
rand in RNGs.jl:370
reserve_1 in RNGs.jl:190
gen_rand in RNGs.jl:186
dsfmt_fill_array_close1_open2! in DSFMT.jl:86
mt_empty in RNGs.jl:180
getproperty in Base.jl:33
rand in RNGs.jl:371
rand_inbounds in RNGs.jl:366
rand_inbounds in RNGs.jl:362
mt_pop! in RNGs.jl:183
+ in int.jl:53
randn in normal.jl:43
* in promotion.jl:312
* in float.jl:405
randn in normal.jl:45
randn_unlikely in normal.jl:58
exp in exp.jl:136
- in float.jl:403
profile_test in REPL[2]:5
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2029
inner_mapslices! in abstractarray.jl:2039
concatenate_setindex! in abstractarray.jl:2058
dotview in broadcast.jl:1138
maybeview in views.jl:124
profile_test in REPL[2]:7
mapslices##kw in abstractarray.jl:1972
#mapslices#115 in abstractarray.jl:2018
similar in abstractarray.jl:626
similar in array.jl:361
Array in boot.jl:415
Array in boot.jl:407