From 9ca42b370e1964afcaac22a5d2ae3cc6dee63b3b Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 18 Feb 2024 03:46:48 -0500 Subject: [PATCH] report sd queue stats --- .../src/http_server/endpoints/stats/get_unified_queue_stats.rs | 3 +++ .../src/http_server/endpoints/stats/result_transformer.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/stats/get_unified_queue_stats.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/stats/get_unified_queue_stats.rs index 0ed6929ef8..6c38f80677 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/stats/get_unified_queue_stats.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/stats/get_unified_queue_stats.rs @@ -47,6 +47,7 @@ pub struct ByQueueStats { pub pending_svc_jobs: u64, pub pending_tacotron2_jobs: u64, pub pending_voice_designer: u64, + pub pending_stable_diffusion: u64, } #[derive(Debug)] @@ -99,6 +100,7 @@ pub async fn get_unified_queue_stats_handler( pending_svc_jobs: 10_000, pending_tacotron2_jobs: 10_000, pending_voice_designer: 10_000, + pending_stable_diffusion: 10_000, } }, legacy_tts: LegacyQueueDetails { @@ -200,6 +202,7 @@ pub async fn get_unified_queue_stats_handler( pending_svc_jobs: cacheable_stats_result.queues.so_vits_svc, pending_tacotron2_jobs: cacheable_stats_result.queues.tacotron2, pending_voice_designer: cacheable_stats_result.queues.vall_e_x, + pending_stable_diffusion: cacheable_stats_result.queues.stable_diffusion, } }, legacy_tts: LegacyQueueDetails { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/stats/result_transformer.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/stats/result_transformer.rs index 5e70d335c1..1fe6736cb9 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/stats/result_transformer.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/stats/result_transformer.rs @@ -28,6 +28,7 @@ pub struct Queues { pub so_vits_svc: u64, pub tacotron2: u64, // Tacotron2 (as generic_inference_jobs; NB: included in `total_generic`) pub vall_e_x: u64, // Counts both model weight calculation and inference. + pub stable_diffusion: u64, } pub fn database_result_to_cacheable(database_records: Vec) -> CacheableQueueStats { @@ -47,6 +48,7 @@ pub fn database_result_to_cacheable(database_records: Vec) -> Cac let so_vits_svc = unwrap(queue_lengths.get("so_vits_svc")); let tacotron2 = unwrap(queue_lengths.get("tacotron2")); let vall_e_x = unwrap(queue_lengths.get("vall_e_x")); + let stable_diffusion = unwrap(queue_lengths.get("stable_diffusion")); let total_generic = rvc_v2 + so_vits_svc; @@ -60,6 +62,7 @@ pub fn database_result_to_cacheable(database_records: Vec) -> Cac so_vits_svc, tacotron2, vall_e_x, + stable_diffusion, }, } }