Report hook run duration in analytics

This commit is contained in:
bromano
2026-06-05 05:07:49 -07:00
parent 55aa071b17
commit 99c22edd4c
4 changed files with 14 additions and 1 deletions
+2
View File
@@ -679,6 +679,7 @@ fn hook_run_analytics_payload(
event_name: completed.run.event_name,
hook_source: completed.run.source,
status: completed.run.status,
duration_ms: completed.run.duration_ms,
},
)
}
@@ -834,6 +835,7 @@ mod tests {
assert_eq!(hook.event_name, HookEventName::Stop);
assert_eq!(hook.hook_source, HookSource::Project);
assert_eq!(hook.status, HookRunStatus::Blocked);
assert_eq!(hook.duration_ms, Some(27));
}
#[tokio::test]