Skip to main content

is_differential_match

Function is_differential_match 

Source
pub fn is_differential_match(diff: &ResponseDiff) -> bool
Examples found in repository?
examples/basic_diff.rs (line 16)
4fn main() {
5    let baseline = ResponseSnapshot::new(200, vec![("Server", "nginx")], "hello world")
6        .with_elapsed(Duration::from_millis(80));
7    let probe = ResponseSnapshot::new(
8        500,
9        vec![("Server", "envoy"), ("X-Blocked", "1")],
10        "request blocked",
11    )
12    .with_elapsed(Duration::from_millis(240));
13
14    let diff = compare_responses(baseline, probe);
15    println!("status_changed={}", diff.status_changed);
16    println!("significant={}", is_differential_match(&diff));
17}