Skip to content

Commit

Permalink
add min for rps
Browse files Browse the repository at this point in the history
  • Loading branch information
hatoo committed May 13, 2024
1 parent 80f8e56 commit 1f2643a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"percentiles": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -273,6 +276,7 @@
"mean",
"stddev",
"max",
"min",
"percentiles"
]
},
Expand Down
4 changes: 3 additions & 1 deletion src/printer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::result_data::ResultData;
use average::{Max, Variance};
use average::{Max, Min, Variance};
use byte_unit::Byte;
use crossterm::style::{StyledContent, Stylize};
use hyper::http::{self, StatusCode};
Expand Down Expand Up @@ -161,6 +161,7 @@ fn print_json<W: Write>(
mean: f64,
stddev: f64,
max: f64,
min: f64,
percentiles: BTreeMap<String, f64>,
}

Expand Down Expand Up @@ -310,6 +311,7 @@ fn print_json<W: Write>(
mean: variance.mean(),
stddev: variance.sample_variance().sqrt(),
max: rps.iter().collect::<Max>().max(),
min: rps.iter().collect::<Min>().min(),
percentiles: rps_percentiles,
};

Expand Down

0 comments on commit 1f2643a

Please sign in to comment.