Open Aloso opened 10 months ago
Just to keep in mind for review, the feature is ideally implemented in a way that other output formats can be supported too. There's a request for Markdown table output too which could potentially build off the work here.
With JSON output from this PR, other formats like CSV/TSV can technically be constructed from the JSON output via tools like jaq
or yq
(also can convert to YAML/TOML).
I'm not sure how useful additional outputs would be beyond JSON and Markdown which should be sufficient for most use-cases, with other output formats being mostly additional convenience?
Any unpushed progress on this, given it has been draft for 65 days?
I also need json output for a report, so am considering just doing it myself.
Closes #10
When running
cargo bench -- --write
, produce a JSON file of the following shape:for this benchmark:
The JSON file is written to
$CARGO_MANIFEST_PATH/target/divan/{time}.json
, where{time}
is a RFC3339 formatted timestamp, e.g.2023-11-12T22:12:00.231816795Z
.I'm planning to create a web app to plot and compare different benchmarks, show changes over time, etc.
TODO:
.
divan = { version = "*", features = ["json"] }
to opt-in)Feedback is appreciated!