mirror of
https://github.com/bevyengine/bevy
synced 2025-01-09 11:48:56 +00:00
068e9eaae8
# Objective - Have an easy way to compare spans between executions ## Solution - Add a tool to compare spans from chrome traces ```bash > cargo run --release -p spancmp -- --help Compiling spancmp v0.1.0 Finished release [optimized] target(s) in 1.10s Running `target/release/spancmp --help` spancmp USAGE: spancmp [OPTIONS] <TRACE> [SECOND_TRACE] ARGS: <TRACE> <SECOND_TRACE> OPTIONS: -h, --help Print help information -p, --pattern <PATTERN> Filter spans by name matching the pattern -t, --threshold <THRESHOLD> Filter spans that have an average shorther than the threshold [default: 0] ``` for each span, it will display the count, minimum duration, average duration and max duration. It can be filtered by a pattern on the span name or by a minimum average duration. just displaying a trace ![Screenshot 2022-04-28 at 21 56 21](https://user-images.githubusercontent.com/8672791/165835310-f465c6f2-9e6b-4808-803e-884b06e49292.png) comparing two traces ![Screenshot 2022-04-28 at 21 56 55](https://user-images.githubusercontent.com/8672791/165835353-097d266b-a70c-41b8-a8c1-27804011dc97.png) Co-authored-by: Robert Swain <robert.swain@gmail.com>
16 lines
415 B
TOML
16 lines
415 B
TOML
[package]
|
|
name = "spancmp"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "compare spans for Bevy"
|
|
publish = false
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[dependencies]
|
|
serde_json = "1.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
clap = { version = "3.1.12", features = ["derive"] }
|
|
regex = "1.5"
|
|
termcolor = "1.1"
|
|
bevy_reflect = { path = "../../crates/bevy_reflect", version = "0.8.0-dev" }
|
|
lazy_static = "1.4"
|