Commit 59108dc1 authored by Leo Gordon's avatar Leo Gordon
Browse files

grouping by u.exit_status allows us to see meaningful resource usage even if...

grouping by u.exit_status allows us to see meaningful resource usage even if not all the data has been loaded
parent 574ea28c
......@@ -72,15 +72,16 @@ CREATE OR REPLACE VIEW resource_usage_stats AS
SELECT CONCAT(logic_name,'(',analysis_id,')') analysis,
w.meadow_type,
CONCAT(rc.name,'(',rc.resource_class_id,')') resource_class,
u.exit_status,
count(*) workers,
min(mem_megs), avg(mem_megs), max(mem_megs),
min(swap_megs), avg(swap_megs), max(swap_megs)
FROM analysis_base
JOIN resource_class rc USING(resource_class_id)
LEFT JOIN worker w USING(analysis_id)
LEFT JOIN worker_resource_usage USING (worker_id)
GROUP BY analysis_id, w.meadow_type
ORDER BY analysis_id, w.meadow_type;
LEFT JOIN worker_resource_usage u USING (worker_id)
GROUP BY analysis_id, w.meadow_type, u.exit_status
ORDER BY analysis_id, w.meadow_type, u.exit_status;
#### time an analysis or group of analyses (given by a name pattern) ######################################
......
......@@ -72,13 +72,14 @@ CREATE OR REPLACE VIEW resource_usage_stats AS
SELECT a.logic_name || '(' || a.analysis_id || ')' analysis,
w.meadow_type,
rc.name || '(' || rc.resource_class_id || ')' resource_class,
u.exit_status,
count(*) workers,
min(mem_megs) AS min_mem_megs, avg(mem_megs) AS avg_mem_megs, max(mem_megs) AS max_mem_megs,
min(swap_megs) AS min_swap_megs, avg(swap_megs) AS avg_swap_megs, max(swap_megs) AS max_swap_megs
FROM analysis_base a
JOIN resource_class rc USING(resource_class_id)
LEFT JOIN worker w USING(analysis_id)
LEFT JOIN worker_resource_usage USING (worker_id)
GROUP BY analysis_id, w.meadow_type, rc.resource_class_id
ORDER BY analysis_id, w.meadow_type;
LEFT JOIN worker_resource_usage u USING (worker_id)
GROUP BY analysis_id, w.meadow_type, rc.resource_class_id, u.exit_status
ORDER BY analysis_id, w.meadow_type, rc.resource_class_id, u.exit_status;
......@@ -72,13 +72,14 @@ CREATE VIEW IF NOT EXISTS resource_usage_stats AS
SELECT a.logic_name || '(' || a.analysis_id || ')' analysis,
w.meadow_type,
rc.name || '(' || rc.resource_class_id || ')' resource_class,
u.exit_status,
count(*) workers,
min(mem_megs) AS min_mem_megs, avg(mem_megs) AS avg_mem_megs, max(mem_megs) AS max_mem_megs,
min(swap_megs) AS min_swap_megs, avg(swap_megs) AS avg_swap_megs, max(swap_megs) AS max_swap_megs
FROM resource_class rc
JOIN analysis_base a USING(resource_class_id)
LEFT JOIN worker w USING(analysis_id)
LEFT JOIN worker_resource_usage USING (worker_id)
GROUP BY analysis_id, w.meadow_type, rc.resource_class_id
ORDER BY analysis_id, w.meadow_type;
LEFT JOIN worker_resource_usage u USING (worker_id)
GROUP BY analysis_id, w.meadow_type, rc.resource_class_id, u.exit_status
ORDER BY analysis_id, w.meadow_type, rc.resource_class_id, u.exit_status;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment