diff --git a/analytics/tts_results.sql b/analytics/tts_results.sql index 9948c93b94..7684820a6f 100644 --- a/analytics/tts_results.sql +++ b/analytics/tts_results.sql @@ -16,3 +16,18 @@ select count(*) as use_count from tts_results where created_at > ( CURDATE() - INTERVAL 7 DAY ) +-- On-prem worker mix +select count(*) as use_count +from tts_results +where created_at > ( CURDATE() - INTERVAL 1 MINUTE ) +and is_generated_on_prem IS TRUE + +-- Calculate a percentage of on-prem worker capacity +select count(*) as on_prem_count +from ( + select is_generated_on_prem + from tts_results + order by id desc limit 1000 +) as sample +where sample.is_generated_on_prem IS TRUE; +