flat* ( profile-data -- flat )
Factor documentation > Factor handbook > Developer tools > Sampling profiler
Prev:cross-section* ( depth profile-data -- tree )


Vocabulary
tools.profiler.sampling

Inputs and outputs
profile-dataraw profile data
flata profile report


Word description
Generates a flat profile from the profile results in profile-data. Each sample's time will be charged to every function in the callstack at the time of the sample. The output tree can be printed with the profile. word.

See also
cross-section*, top-down*, top-down-max-depth*, most-recent-profile-data

Definition
USING: assocs tools.profiler.sampling.private ;

IN: tools.profiler.sampling

: flat* ( profile-data -- flat )
collect-threads
[ [ collect-flat ] <profile-root-node> trim-flat ]
assoc-map ;