Skip to content

Commit

Permalink
Merge 3e1aea8 into 03f349e
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkirsz committed Dec 22, 2022
2 parents 03f349e + 3e1aea8 commit c5d25c9
Show file tree
Hide file tree
Showing 4 changed files with 303 additions and 114 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ chrono = "0.4.22"
clap = { version = "4.0.18", features = ["derive"] }
indexmap = { workspace = true }
inquire = { version = "0.5.1" }
num-format = "0.4.4"
owo-colors = "3"
plotters = { version = "0.3.4", features = ["full_palette"] }
semver = "1"
Expand Down
9 changes: 7 additions & 2 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ To generate the summary json file:
Visualizations generated by this command will appear in a sibling directory to the summary data \
file.",
)
.arg(arg!(<PATH_TO_SUMMARY_JSON> "the path to the benchmark summary json file")),
.arg(arg!(<PATH_TO_SUMMARY_JSON> "the path to the benchmark summary json file"))
.arg(arg!(--bundlers <BUNDLERS> "comma separated list of bundlers to include in the visualization")),
)
}

Expand Down Expand Up @@ -166,9 +167,13 @@ fn main() {
let path = sub_matches
.get_one::<String>("PATH_TO_SUMMARY_JSON")
.expect("PATH_TO_SUMMARY_JSON is required");
let bundlers: Option<HashSet<&str>> = sub_matches
.get_one::<String>("bundlers")
.map(|s| s.split(',').collect());

let path = PathBuf::from(path);
let path = path.canonicalize().unwrap();
visualize_bundler_bench::generate(path).unwrap();
visualize_bundler_bench::generate(path, bundlers).unwrap();
}
_ => {
panic!("Unknown command {:?}", matches.subcommand().map(|c| c.0));
Expand Down
Loading

0 comments on commit c5d25c9

Please sign in to comment.