fix(#1179): normalize bash-task-* wake_from at write time
This commit is contained in:
parent
3ccfc647f7
commit
8af06aefdb
2 changed files with 6 additions and 6 deletions
|
|
@ -69,6 +69,11 @@ pub fn build_row(
|
||||||
TurnOutcome::AuthFailed => ("auth_failed", None),
|
TurnOutcome::AuthFailed => ("auth_failed", None),
|
||||||
TurnOutcome::Failed(e) => ("failed", Some(format!("{e:#}"))),
|
TurnOutcome::Failed(e) => ("failed", Some(format!("{e:#}"))),
|
||||||
};
|
};
|
||||||
|
let wake_from = if wake_from.starts_with("bash-task-") {
|
||||||
|
"bash-task".to_owned()
|
||||||
|
} else {
|
||||||
|
wake_from
|
||||||
|
};
|
||||||
TurnStatRow {
|
TurnStatRow {
|
||||||
started_at,
|
started_at,
|
||||||
ended_at,
|
ended_at,
|
||||||
|
|
|
||||||
|
|
@ -245,12 +245,7 @@ fn snapshot(path: &Path, window: Window) -> Result<Snapshot> {
|
||||||
*acc.model_counts.entry(r.model.clone()).or_insert(0) += 1;
|
*acc.model_counts.entry(r.model.clone()).or_insert(0) += 1;
|
||||||
|
|
||||||
all_durations.push(r.duration_ms.max(0));
|
all_durations.push(r.duration_ms.max(0));
|
||||||
let wake_key = if r.wake_from.starts_with("bash-task-") {
|
*wake_totals.entry(r.wake_from).or_insert(0) += 1;
|
||||||
"bash-task".to_owned()
|
|
||||||
} else {
|
|
||||||
r.wake_from
|
|
||||||
};
|
|
||||||
*wake_totals.entry(wake_key).or_insert(0) += 1;
|
|
||||||
*result_totals.entry(r.result_kind).or_insert(0) += 1;
|
*result_totals.entry(r.result_kind).or_insert(0) += 1;
|
||||||
model_set.insert(r.model);
|
model_set.insert(r.model);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue