Skip to content

Commit

Permalink
docs: add documentation for the baseline feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Aug 28, 2024
1 parent c90e1c3 commit d5ae6ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct GooseConfiguration {
/// Create reports, can be used multiple times (supports .html, .htm, .md, .json)
#[options(no_short, meta = "NAME")]
pub report_file: Vec<String>,
/// An optional baseline, for rendering the report
/// An optional baseline JSON report, for rendering the reports with deltas
#[options(no_short, meta = "NAME")]
pub baseline_file: Option<String>,
/// Disable granular graphs in report file
Expand Down Expand Up @@ -286,7 +286,7 @@ pub(crate) struct GooseDefaults {
pub no_error_summary: Option<bool>,
/// An optional default for the html-formatted report file name.
pub report_file: Option<Vec<String>>,
/// An optional baseline file for the reports.
/// /// An optional baseline JSON report, for rendering the reports with deltas
pub baseline_file: Option<String>,
/// An optional default for the flag that disables granular data in HTML report graphs.
pub no_granular_report: Option<bool>,
Expand Down
12 changes: 12 additions & 0 deletions src/docs/goose-book/src/getting-started/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,15 @@ The JSON report is a dump of the internal metrics collection. It is a JSON seria

### Developer documentation
Additional details about how metrics are collected, stored, and displayed can be found [in the developer documentation](https://docs.rs/goose/*/goose/metrics/index.html).

## Baseline deltas

It is possible to use a previously generated JSON report as a baseline for reports. In addition to the actual values, this will then also show the difference from the last.

To use this, you will need to:

* Create a baseline report by running it at least once using `--report-file report.json`
* Then start adding `--baseline-file report.json` to later runs

It is possible to still keep generating a JSON report at the same time as using a baseline file. So that you can
create the next basefile in the same step.
1 change: 1 addition & 0 deletions src/docs/goose-book/src/getting-started/runtime-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Metrics:
--no-print-metrics Doesn't display metrics at end of load test
--no-error-summary Doesn't display an error summary
--report-file NAME Create reports, can be used multiple times (supports .html, .htm, .md, .json)
--baseline-file NAME An optional baseline JSON report, for rendering the reports with deltas
--no-granular-report Disable granular graphs in report file
-R, --request-log NAME Sets request log file name
--request-format FORMAT Sets request log format (csv, json, raw, pretty)
Expand Down

0 comments on commit d5ae6ae

Please sign in to comment.