#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

#173 in Profiling

Download history 1146/week @ 2024-07-20 1120/week @ 2024-07-27 890/week @ 2024-08-03 739/week @ 2024-08-10 810/week @ 2024-08-17 724/week @ 2024-08-24 992/week @ 2024-08-31 758/week @ 2024-09-07 854/week @ 2024-09-14 1316/week @ 2024-09-21 787/week @ 2024-09-28 678/week @ 2024-10-05 1559/week @ 2024-10-12 1781/week @ 2024-10-19 1650/week @ 2024-10-26 1729/week @ 2024-11-02

6,998 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