Coverage for chalicelib/core/sessions/performance_event.py: 0%

3 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-10 12:56 +0000

1import schemas 

2 

3 

4def get_col(perf: schemas.PerformanceEventType): 

5 return { 

6 schemas.PerformanceEventType.LOCATION_DOM_COMPLETE: {"column": "dom_building_time", "extraJoin": None}, 

7 schemas.PerformanceEventType.LOCATION_TTFB: {"column": "ttfb", "extraJoin": None}, 

8 schemas.PerformanceEventType.LOCATION_AVG_CPU_LOAD: {"column": "avg_cpu", "extraJoin": "events.performance"}, 

9 schemas.PerformanceEventType.LOCATION_AVG_MEMORY_USAGE: {"column": "avg_used_js_heap_size", 

10 "extraJoin": "events.performance"}, 

11 schemas.PerformanceEventType.FETCH_FAILED: {"column": "success", "extraJoin": None}, 

12 # schemas.PerformanceEventType.fetch_duration: {"column": "duration", "extraJoin": None}, 

13 schemas.PerformanceEventType.LOCATION_LARGEST_CONTENTFUL_PAINT_TIME: {"column": "first_contentful_paint_time", 

14 "extraJoin": None} 

15 }.get(perf)