{"id":16936485,"url":"https://github.com/jonhoo/tracing-timing","last_synced_at":"2025-04-06T02:11:59.263Z","repository":{"id":43269786,"uuid":"193954950","full_name":"jonhoo/tracing-timing","owner":"jonhoo","description":"Inter-event timing metrics on top of tracing.","archived":false,"fork":false,"pushed_at":"2024-01-30T20:09:08.000Z","size":169,"stargazers_count":116,"open_issues_count":5,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-30T01:11:18.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonhoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-26T18:07:16.000Z","updated_at":"2024-12-26T00:13:33.000Z","dependencies_parsed_at":"2024-10-26T21:19:11.190Z","dependency_job_id":"0bddd07e-ded3-47d2-a6ad-29a352ad4456","html_url":"https://github.com/jonhoo/tracing-timing","commit_stats":{"total_commits":112,"total_committers":2,"mean_commits":56.0,"dds":0.1071428571428571,"last_synced_commit":"0b7a69643a378ddb0a501b2daec16dd5eb595abf"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Ftracing-timing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Ftracing-timing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Ftracing-timing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Ftracing-timing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhoo","download_url":"https://codeload.github.com/jonhoo/tracing-timing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:57:07.473Z","updated_at":"2025-04-06T02:11:59.246Z","avatar_url":"https://github.com/jonhoo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Crates.io](https://img.shields.io/crates/v/tracing-timing.svg)](https://crates.io/crates/tracing-timing)\n[![Documentation](https://docs.rs/tracing-timing/badge.svg)](https://docs.rs/tracing-timing/)\n[![Codecov](https://codecov.io/github/jonhoo/tracing-timing/coverage.svg?branch=master)](https://codecov.io/gh/jonhoo/tracing-timing)\n[![Dependency status](https://deps.rs/repo/github/jonhoo/tracing-timing/status.svg)](https://deps.rs/repo/github/jonhoo/tracing-timing)\n\nInter-event timing metrics on top of [`tracing`].\n\nThis crate provides a `tracing::Subscriber` that keeps statistics on inter-event timing\ninformation. More concretely, given code like this:\n\n```rust\nuse tracing::*;\nuse tracing_timing::{Builder, Histogram};\nlet subscriber = Builder::default().build(|| Histogram::new_with_max(1_000_000, 2).unwrap());\nlet dispatcher = Dispatch::new(subscriber);\ndispatcher::with_default(\u0026dispatcher, || {\n    trace_span!(\"request\").in_scope(|| {\n        // do a little bit of work\n        trace!(\"fast\");\n        // do a lot of work\n        trace!(\"slow\");\n    })\n});\n```\n\nYou can produce something like this (see `examples/pretty.rs`):\n\n```text\nfast:\nmean: 173.2µs, p50: 172µs, p90: 262µs, p99: 327µs, p999: 450µs, max: 778µs\n  25µs | *                                        |  2.2th %-ile\n  50µs | *                                        |  2.2th %-ile\n  75µs | *                                        |  4.7th %-ile\n 100µs | ***                                      | 11.5th %-ile\n 125µs | *****                                    | 24.0th %-ile\n 150µs | *******                                  | 41.1th %-ile\n 175µs | ********                                 | 59.2th %-ile\n 200µs | *******                                  | 75.4th %-ile\n 225µs | **                                       | 80.1th %-ile\n 250µs | ***                                      | 87.3th %-ile\n 275µs | ***                                      | 94.4th %-ile\n 300µs | **                                       | 97.8th %-ile\n\nslow:\nmean: 623.3µs, p50: 630µs, p90: 696µs, p99: 770µs, p999: 851µs, max: 950µs\n 500µs | *                                        |  1.6th %-ile\n 525µs | **                                       |  4.8th %-ile\n 550µs | ***                                      | 10.9th %-ile\n 575µs | *****                                    | 22.2th %-ile\n 600µs | *******                                  | 37.9th %-ile\n 625µs | ********                                 | 55.9th %-ile\n 650µs | *******                                  | 72.9th %-ile\n 675µs | ******                                   | 85.6th %-ile\n 700µs | ****                                     | 93.5th %-ile\n 725µs | **                                       | 97.1th %-ile\n```\n\nWhen [`TimingSubscriber`] is used as the `tracing::Dispatch`, the time between each event in a\nspan is measured using [`quanta`], and is recorded in \"[high dynamic range histograms]\" using\n[`hdrhistogram`]'s multi-threaded recording facilities. The recorded timing information is\ngrouped using the [`SpanGroup`] and [`EventGroup`] traits, allowing you to combine recorded\nstatistics across spans and events.\n\n  [`tracing`]: https://docs.rs/tracing-core/\n  [high dynamic range histograms]: https://hdrhistogram.github.io/HdrHistogram/\n  [`hdrhistogram`]: https://docs.rs/hdrhistogram/\n  [`quanta`]: https://docs.rs/quanta/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Ftracing-timing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhoo%2Ftracing-timing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Ftracing-timing/lists"}