[Bug 1803344] GLAM - use firefox-desktop Glean metadata to build fog queries (#3386)
This commit is contained in:
Родитель
60949e81b6
Коммит
26413d5ecd
|
@ -108,6 +108,9 @@ def histogram_bucket_counts(**kwargs):
|
|||
metric_attributes_list = ["metric", "metric_type", "key", "agg_type"]
|
||||
fixed_attributes = ["app_version", "channel"]
|
||||
cubed_attributes = [x for x in attributes_list if x not in fixed_attributes]
|
||||
custom_dist_metadata = set()
|
||||
for product_name in ["fenix", "firefox-desktop"]:
|
||||
custom_dist_metadata.update(get_custom_distribution_metadata(product_name))
|
||||
return dict(
|
||||
attributes_list=attributes_list,
|
||||
attributes=",".join(attributes_list),
|
||||
|
@ -115,7 +118,7 @@ def histogram_bucket_counts(**kwargs):
|
|||
attribute_combinations=compute_datacube_groupings(cubed_attributes),
|
||||
metric_attributes_list=metric_attributes_list,
|
||||
metric_attributes=",".join(metric_attributes_list),
|
||||
custom_distribution_metadata_list=get_custom_distribution_metadata("fenix"),
|
||||
custom_distribution_metadata_list=custom_dist_metadata,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ build_ids AS (
|
|||
1,
|
||||
2
|
||||
HAVING
|
||||
COUNT(DISTINCT client_id) > 10
|
||||
COUNT(DISTINCT client_id) > 0
|
||||
),
|
||||
normalized_histograms AS (
|
||||
SELECT
|
||||
|
@ -98,6 +98,14 @@ distribution_metadata AS (
|
|||
FROM
|
||||
UNNEST(
|
||||
[
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"power_battery_percentage_when_user_active" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
100 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"search_terms_group_size_distribution" AS metric,
|
||||
|
@ -106,6 +114,30 @@ distribution_metadata AS (
|
|||
5 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_execution_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_baseline_compile_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_content_frame_time_from_paint" AS metric,
|
||||
1 AS range_min,
|
||||
5000 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"geckoview_document_site_origins" AS metric,
|
||||
|
@ -116,33 +148,17 @@ distribution_metadata AS (
|
|||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"geckoview_per_document_site_origins" AS metric,
|
||||
"js_delazification_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_checkerboard_peak_pixel_count" AS metric,
|
||||
"pdfjs_time_to_view" AS metric,
|
||||
1 AS range_min,
|
||||
66355200 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_checkerboard_severity" AS metric,
|
||||
1 AS range_min,
|
||||
1073741824 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_content_frame_time_from_paint" AS metric,
|
||||
1 AS range_min,
|
||||
5000 AS range_max,
|
||||
10000 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
|
@ -156,12 +172,28 @@ distribution_metadata AS (
|
|||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_content_frame_time_with_svg" AS metric,
|
||||
"gfx_content_frame_time_without_upload" AS metric,
|
||||
1 AS range_min,
|
||||
5000 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_checkerboard_severity" AS metric,
|
||||
1 AS range_min,
|
||||
1073741824 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"geckoview_per_document_site_origins" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_content_frame_time_without_resource_upload" AS metric,
|
||||
|
@ -172,44 +204,12 @@ distribution_metadata AS (
|
|||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_content_frame_time_without_upload" AS metric,
|
||||
"gfx_checkerboard_peak_pixel_count" AS metric,
|
||||
1 AS range_min,
|
||||
5000 AS range_max,
|
||||
66355200 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_baseline_compile_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_delazification_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_execution_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_xdr_encode_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"performance_clone_deserialize_items" AS metric,
|
||||
|
@ -217,6 +217,22 @@ distribution_metadata AS (
|
|||
2147483646 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"gfx_content_frame_time_with_svg" AS metric,
|
||||
1 AS range_min,
|
||||
5000 AS range_max,
|
||||
50 AS bucket_count,
|
||||
"exponential" AS histogram_type
|
||||
),
|
||||
STRUCT(
|
||||
"custom_distribution" AS metric_type,
|
||||
"js_xdr_encode_percentage" AS metric,
|
||||
0 AS range_min,
|
||||
100 AS range_max,
|
||||
20 AS bucket_count,
|
||||
"linear" AS histogram_type
|
||||
)
|
||||
]
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче