Remove stddev and direction columns
This commit is contained in:
parent
0d48e0791b
commit
2bf939186d
10 changed files with 32 additions and 116 deletions
|
|
@ -81,18 +81,14 @@ async fn save_work(
|
|||
id, \
|
||||
metric, \
|
||||
value, \
|
||||
stddev, \
|
||||
unit, \
|
||||
direction \
|
||||
unit \
|
||||
) \
|
||||
VALUES (?, ?, ?, ?, ?, ?) \
|
||||
VALUES (?, ?, ?, ?) \
|
||||
",
|
||||
run.id,
|
||||
metric,
|
||||
measurement.value,
|
||||
measurement.stddev,
|
||||
measurement.unit,
|
||||
measurement.direction,
|
||||
)
|
||||
.execute(&mut *conn)
|
||||
.await?;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ use crate::{
|
|||
struct Measurement {
|
||||
metric: String,
|
||||
value: String,
|
||||
stddev: String,
|
||||
unit: String,
|
||||
direction: &'static str,
|
||||
}
|
||||
|
||||
struct Line {
|
||||
|
|
@ -83,9 +81,7 @@ async fn from_finished_run(
|
|||
SELECT \
|
||||
metric, \
|
||||
value, \
|
||||
stddev, \
|
||||
unit, \
|
||||
direction \
|
||||
unit \
|
||||
FROM run_measurements \
|
||||
WHERE id = ? \
|
||||
ORDER BY metric ASC \
|
||||
|
|
@ -96,14 +92,7 @@ async fn from_finished_run(
|
|||
.map_ok(|r| Measurement {
|
||||
metric: r.metric,
|
||||
value: util::format_value(r.value),
|
||||
stddev: r.stddev.map(util::format_value).unwrap_or_default(),
|
||||
unit: r.unit.unwrap_or_default(),
|
||||
direction: match r.direction {
|
||||
Some(..=-1) => "less is better",
|
||||
Some(0) => "neutral",
|
||||
Some(1..) => "more is better",
|
||||
None => "",
|
||||
},
|
||||
})
|
||||
.try_collect::<Vec<_>>()
|
||||
.await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue