profile-flame-graph
profile-thunk
profile
7.1

profile-flame-graph

 (require profile-flame-graph)
  package: profile-flame-graph

This library lets you output Racket profiler captures from the profile library in a format that the flamegraph.pl script understands.

procedure

(profile-thunk thunk    
  [#:svg-path svg-path    
  #:preview? preview?    
  #:delay delay    
  #:repeat iterations    
  #:threads threads?    
  #:use-errortrace? use-errortrace?])  any/c
  thunk : (-> any/c)
  svg-path : (or/c path? #f) = #f
  preview? : any/c = #f
  delay : (>=/c 0.0) = 0.05
  iterations : exact-nonnegative-integer? = 1
  threads? : any/c = #f
  use-errortrace? : any/c = #f
Identical to the function in the profile library except that it does not accept a #:render keyword, does not support the #:periodic-renderer feature, and takes an optional svg-path argument.

If svg-path is provided, this function will attempt to call the flamegraph.pl script (a path to the script must be in the PATH variable) to output an SVG document to svg-path.

Otherwise, the function will print the profile results in a format that is understood by the flamegraph.pl script to the current output port.

If preview? is a true value, then an SVG document will be generated (either to svg-path or to a temporary path) and will be displayed in the configured web browser using send-url/file.

syntax

(profile expr keyword-arguments ...)

Similar to the macro with the same name in the profile library except that it takes an additional #:svg-path argument that is passed onto profile-thunk.