report sd queue stats

This commit is contained in:
Brandon Thomas committed 2024-02-18 03:46:48 -05:00
1 parent ef9cc7de72
commit 9ca42b370e
2 files changed
+6

No files matched your search

@@ -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 {
@@ -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<QueueStatsRow>) -> CacheableQueueStats {
@@ -47,6 +48,7 @@ pub fn database_result_to_cacheable(database_records: Vec<QueueStatsRow>) -> 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<QueueStatsRow>) -> Cac
so_vits_svc,
tacotron2,
vall_e_x,
stable_diffusion,
},
}
}