#tracing-subscriber #hierarchical #spans #timing #aggregate #data

tracing-span-tree

Simple tracing subscriber for hierarchical profiling

2 releases

0.1.1 Mar 22, 2022
0.1.0 Sep 2, 2021

#161 in Profiling

Download history 1066/week @ 2024-07-26 977/week @ 2024-08-02 763/week @ 2024-08-09 820/week @ 2024-08-16 648/week @ 2024-08-23 952/week @ 2024-08-30 895/week @ 2024-09-06 671/week @ 2024-09-13 1365/week @ 2024-09-20 820/week @ 2024-09-27 586/week @ 2024-10-04 1449/week @ 2024-10-11 1823/week @ 2024-10-18 1726/week @ 2024-10-25 1614/week @ 2024-11-01 1626/week @ 2024-11-08

7,112 downloads per month
Used in nodejs-resolver

MIT/Apache

8KB
134 lines

Consumer of tracing data, which prints a hierarchical profile.

Based on https://github.com/davidbarsky/tracing-tree, but does less, while actually printing timings for spans by default.

Usage:

tracing_span_tree::span_tree()
    .aggregate(true)
    .enable();

Example output:

8.37ms           top_level
  1.09ms           middle
    1.06ms           leaf
  1.06ms           middle
  3.12ms           middle
    1.06ms           leaf
  3.06ms           middle

Same data, but with .aggregate(true):

8.39ms           top_level
  8.35ms    4      middle
    2.13ms    2      leaf

lib.rs:

Consumer of tracing data, which prints a hierarchical profile.

Based on https://github.com/davidbarsky/tracing-tree, but does less, while actually printing timings for spans by default.

Usage:

tracing_span_tree::span_tree()
    .aggregate(true)
    .enable();

Example output:

8.37ms           top_level
  1.09ms           middle
    1.06ms           leaf
  1.06ms           middle
  3.12ms           middle
    1.06ms           leaf
  3.06ms           middle

Same data, but with .aggregate(true):

8.39ms           top_level
 8.35ms    4      middle
   2.13ms    2      leaf

Dependencies

~1.5MB
~22K SLoC