fix(usage): record visible stream first byte timing

This commit is contained in:
fawney19
2026-05-27 02:48:01 +08:00
parent f03550415b
commit cf8372c8cb
10 changed files with 656 additions and 94 deletions
@@ -177,7 +177,7 @@ async fn gateway_background_video_task_poller_refreshes_due_openai_task_from_rep
assert!(!background_tasks.is_empty(), "poller task should spawn");
let stored = {
let deadline = tokio::time::Instant::now() + std::time::Duration::from_millis(500);
let deadline = tokio::time::Instant::now() + std::time::Duration::from_secs(2);
loop {
let stored = repository
.find(VideoTaskLookupKey::Id("task-local-123"))
@@ -189,7 +189,7 @@ async fn gateway_background_video_task_poller_refreshes_due_openai_task_from_rep
}
assert!(
tokio::time::Instant::now() < deadline,
"poller did not refresh task within 500ms"
"poller did not refresh task within 2s"
);
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
}
@@ -283,7 +283,7 @@ async fn gateway_background_video_task_poller_refreshes_due_openai_task_from_rep
assert!(!background_tasks.is_empty(), "poller task should spawn");
let stored = {
let deadline = tokio::time::Instant::now() + std::time::Duration::from_millis(500);
let deadline = tokio::time::Instant::now() + std::time::Duration::from_secs(2);
loop {
let stored = repository
.find(VideoTaskLookupKey::Id("task-local-123"))
@@ -295,7 +295,7 @@ async fn gateway_background_video_task_poller_refreshes_due_openai_task_from_rep
}
assert!(
tokio::time::Instant::now() < deadline,
"poller did not refresh task within 500ms"
"poller did not refresh task within 2s"
);
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
}