* refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * refactor(chalice): refactored search sessions hooks * refactor(DB): DB delta * refactor(DB): DB delta * refactor(DB): DB delta * refactor(chalice): refactored schemas * refactor(chalice): refactored schemas refactor(chalice): cleaned scripts feat(chalice): search sessions by CSS selector (PG)
15 lines
1 KiB
Python
15 lines
1 KiB
Python
import schemas
|
|
|
|
|
|
def get_col(perf: schemas.PerformanceEventType):
|
|
return {
|
|
schemas.PerformanceEventType.LOCATION_DOM_COMPLETE: {"column": "dom_building_time", "extraJoin": None},
|
|
schemas.PerformanceEventType.LOCATION_TTFB: {"column": "ttfb", "extraJoin": None},
|
|
schemas.PerformanceEventType.LOCATION_AVG_CPU_LOAD: {"column": "avg_cpu", "extraJoin": "events.performance"},
|
|
schemas.PerformanceEventType.LOCATION_AVG_MEMORY_USAGE: {"column": "avg_used_js_heap_size",
|
|
"extraJoin": "events.performance"},
|
|
schemas.PerformanceEventType.FETCH_FAILED: {"column": "success", "extraJoin": None},
|
|
# schemas.PerformanceEventType.fetch_duration: {"column": "duration", "extraJoin": None},
|
|
schemas.PerformanceEventType.LOCATION_LARGEST_CONTENTFUL_PAINT_TIME: {"column": "first_contentful_paint_time",
|
|
"extraJoin": None}
|
|
}.get(perf)
|