diff --git a/api/build_local.sh b/api/build_local.sh deleted file mode 100644 index 4253fd812..000000000 --- a/api/build_local.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker build -f ./Dockerfile --build-arg envarg="default-foss" -t chalice:local . \ No newline at end of file diff --git a/api/routers/subs/dashboard.py b/api/routers/subs/dashboard.py index fdb5d641a..0832be4b8 100644 --- a/api/routers/subs/dashboard.py +++ b/api/routers/subs/dashboard.py @@ -388,8 +388,10 @@ def get_dashboard_group(projectId: int, data: schemas.MetricPayloadSchema = Body "data": dashboard.get_time_to_render(project_id=projectId, **data.dict())}, {"key": schemas.TemplateKeys.avg_used_js_heap_size, "data": dashboard.get_memory_consumption(project_id=projectId, **data.dict())}, - {"key": schemas.TemplateKeys.avg_cpu, "data": dashboard.get_avg_cpu(project_id=projectId, **data.dict())}, - {"key": schemas.TemplateKeys.avg_fps, "data": dashboard.get_avg_fps(project_id=projectId, **data.dict())} + {"key": schemas.TemplateKeys.avg_cpu, + "data": dashboard.get_avg_cpu(project_id=projectId, **data.dict())}, + {"key": schemas.TemplateKeys.avg_fps, + "data": dashboard.get_avg_fps(project_id=projectId, **data.dict())} ] results = sorted(results, key=lambda r: r["key"]) return {"data": results} diff --git a/scripts/helm/db/init_dbs/postgresql/1.5.5/1.5.5.sql b/scripts/helm/db/init_dbs/postgresql/1.5.5/1.5.5.sql index d4d8575ae..6c563bfdc 100644 --- a/scripts/helm/db/init_dbs/postgresql/1.5.5/1.5.5.sql +++ b/scripts/helm/db/init_dbs/postgresql/1.5.5/1.5.5.sql @@ -59,7 +59,7 @@ VALUES ('sessions count', 'overview', '{}', true, true, true, 'count_sessions'), ('avg first contentful pixel', 'overview', '{}', true, true, true, 'avg_first_contentful_pixel'), ('avg visited pages count', 'overview', '{}', true, true, true, 'avg_visited_pages'), ('avg session duration', 'overview', '{}', true, true, true, 'avg_session_duration'), - ('avg pages dom buildtime', 'overview', '{}', true, true, true, 'avg_pages_dom_buildtime'), + ('avg pages dom build time', 'overview', '{}', true, true, true, 'avg_pages_dom_buildtime'), ('avg pages response time', 'overview', '{}', true, true, true, 'avg_pages_response_time'), ('avg response time', 'overview', '{}', true, true, true, 'avg_response_time'), ('avg first paint', 'overview', '{}', true, true, true, 'avg_first_paint'), diff --git a/scripts/helm/db/init_dbs/postgresql/init_schema.sql b/scripts/helm/db/init_dbs/postgresql/init_schema.sql index c6f628e32..5b5bd7044 100644 --- a/scripts/helm/db/init_dbs/postgresql/init_schema.sql +++ b/scripts/helm/db/init_dbs/postgresql/init_schema.sql @@ -1025,4 +1025,31 @@ $$ $$ LANGUAGE plpgsql; +INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key) +VALUES ('sessions count', 'overview', '{}', true, true, true, 'count_sessions'), + ('avg request load time', 'overview', '{}', true, true, true, 'avg_request_load_time'), + ('avg page load time', 'overview', '{}', true, true, true, 'avg_page_load_time'), + ('avg image load time', 'overview', '{}', true, true, true, 'avg_image_load_time'), + ('avg dom content load start', 'overview', '{}', true, true, true, 'avg_dom_content_load_start'), + ('avg first contentful pixel', 'overview', '{}', true, true, true, 'avg_first_contentful_pixel'), + ('avg visited pages count', 'overview', '{}', true, true, true, 'avg_visited_pages'), + ('avg session duration', 'overview', '{}', true, true, true, 'avg_session_duration'), + ('avg pages dom build time', 'overview', '{}', true, true, true, 'avg_pages_dom_buildtime'), + ('avg pages response time', 'overview', '{}', true, true, true, 'avg_pages_response_time'), + ('avg response time', 'overview', '{}', true, true, true, 'avg_response_time'), + ('avg first paint', 'overview', '{}', true, true, true, 'avg_first_paint'), + ('avg dom content loaded', 'overview', '{}', true, true, true, 'avg_dom_content_loaded'), + ('avg time till first bit', 'overview', '{}', true, true, true, 'avg_till_first_bit'), + ('avg time to interactive', 'overview', '{}', true, true, true, 'avg_time_to_interactive'), + ('requests count', 'overview', '{}', true, true, true, 'count_requests'), + ('avg time to render', 'overview', '{}', true, true, true, 'avg_time_to_render'), + ('avg used js heap size', 'overview', '{}', true, true, true, 'avg_used_js_heap_size'), + ('avg cpu', 'overview', '{}', true, true, true, 'avg_cpu') +ON CONFLICT (key) DO UPDATE SET name=excluded.name, + category=excluded.category, + config=excluded.config, + is_predefined=excluded.is_predefined, + is_template=excluded.is_template, + is_public=excluded.is_public; + COMMIT; \ No newline at end of file