mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 17:08:13 +00:00
on-prem analytics queries
This commit is contained in:
1 parent
2bc00dd6ca
commit
ec1f5edd5c
1 file changed
+15
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user