collect-cross-section ( samples depth -- cross-section )


Vocabulary
tools.profiler.sampling.private

Inputs
samplesan object
depthan object


Outputs
cross-sectionan object


Definition


:: collect-cross-section ( samples depth -- cross-section )
IH{ } clone :> per-word-samples samples [| sample |
depth sample sample-callstack [ ignore-word? ] trim-tail
nth-or-last :> word word
[ word per-word-samples sample counts+at ] when
] each per-word-samples [ f depth <profile-node> ] assoc-map
;