Skip to content

Commit

Permalink
Add pass% to output files
Browse files Browse the repository at this point in the history
  • Loading branch information
blizzardfinnegan committed Aug 2, 2023
1 parent 4af32bd commit 66842df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/output_facade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use ordered_float::OrderedFloat;

const ITERATION_COUNT:&str="iterations completed this run";
const PASS_COUNT:&str="passing iterations";
const PASS_PERCENT:&str="Pass %";
const DEFAULT_LOWER:f32=35.8;
const DEFAULT_UPPER:f32=36.2;
pub struct OutputFile{
Expand Down Expand Up @@ -98,7 +99,9 @@ impl OutputFile{
saved_data.with_section(Some(&(device.to_owned() + " read value counts").to_string())).set(&value.to_string(),&count.to_string());
});

let pass_percent= (iteration_count - (iteration_count - pass_iteration_count)) / iteration_count;
saved_data.with_section(Some(device))
.set(PASS_PERCENT, pass_percent.to_string())
.set(ITERATION_COUNT, iteration_count.to_string())
.set(PASS_COUNT,pass_iteration_count.to_string());
});
Expand Down

0 comments on commit 66842df

Please sign in to comment.