Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Optimization: selecting a single segment, e.g. "Mac", still appears to lead to queries against all platforms

Đang mở
#10 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, sql
Lĩnh vực
analytics, data

Hướng nghiên cứu

Start by tracing how the YAML segments value is handled when generating the BigQuery query shown in the logs, especially the desktop_data and android_data branches. Compare the requested Mac segment with the query's normalized_os segment and verify that the completed change restricts results to the intended platform instead of querying Fenix and all desktop platforms.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Using this configuration, only looking at Mac:

slug: fast-udp-for-firefox-large-release-experiment

segments:
  - Mac

histograms:
  metrics.custom_distribution.networking_http_1_upload_throughput:
    higher_is_better: true
  metrics.custom_distribution.networking_http_2_upload_throughput:
    higher_is_better: true
  metrics.custom_distribution.networking_http_3_upload_throughput:
    higher_is_better: true

The queries appear to be made against Fenix and all off Desktop.
I was expecting a Darwin filter or similar.

Logs:

Using Config:
{
  "slug": "fast-udp-for-firefox-large-release-experiment",
  "segments": [
    "Mac"
  ],
  "histograms": {
    "metrics.custom_distribution.networking_http_1_upload_throughput": {
      "higher_is_better": true,
      "glean": true,
      "desc": "The upload throughput for http/1.0, http/1.1 requests larger than 10MB. Measured in megabits per second, Mbps.\n",
      "available_on_desktop": true,
      "available_on_android": true,
      "kind": "numerical",
      "distribution_type": "custom_distribution",
      "max": 5000
    },
    "metrics.custom_distribution.networking_http_2_upload_throughput": {
      "higher_is_better": true,
      "glean": true,
      "desc": "The upload throughput for http/2 requests larger than 10MB. Measured in megabits per second, Mbps.\n",
      "available_on_desktop": true,
      "available_on_android": true,
      "kind": "numerical",
      "distribution_type": "custom_distribution",
      "max": 5000
    },
    "metrics.custom_distribution.networking_http_3_upload_throughput": {
      "higher_is_better": true,
      "glean": true,
      "desc": "The upload throughput for http/3 requests larger than 10MB. Measured in megabits per second, Mbps.\n",
      "available_on_desktop": true,
      "available_on_android": true,
      "kind": "numerical",
      "distribution_type": "custom_distribution",
      "max": 5000
    }
  },
  "is_experiment": true,
  "pageload_event_metrics": {},
  "crash_event_metrics": {},
  "startDate": "2025-08-20",
  "endDate": "2025-10-02",
  "channel": "release",
  "isRollout": false,
  "branches": [
    {
      "name": "control-nspr"
    },
    {
      "name": "treatment-fast-udp"
    }
  ],
  "include_non_enrolled_branch": false
}
Running 3 queries in parallel using 4 threads...
Running query:
with
desktop_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.firefox_desktop.metrics` as d
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_2_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND normalized_app_name = "Firefox"
      AND metrics.custom_distribution.networking_http_2_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
),
android_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.fenix.metrics` as f
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_2_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND metrics.custom_distribution.networking_http_2_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
)
SELECT
    segment,
    branch,
    bucket,
    SUM(count) as counts
FROM
    (
        SELECT * FROM desktop_data
        UNION ALL
        SELECT * FROM android_data
    ) s
GROUP BY
  segment, branch, bucket
ORDER BY
  segment, branch, bucket
Running query:
with
desktop_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.firefox_desktop.metrics` as d
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_1_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND normalized_app_name = "Firefox"
      AND metrics.custom_distribution.networking_http_1_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
),
android_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.fenix.metrics` as f
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_1_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND metrics.custom_distribution.networking_http_1_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
)
SELECT
    segment,
    branch,
    bucket,
    SUM(count) as counts
FROM
    (
        SELECT * FROM desktop_data
        UNION ALL
        SELECT * FROM android_data
    ) s
GROUP BY
  segment, branch, bucket
ORDER BY
  segment, branch, bucketRunning query:
with
desktop_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.firefox_desktop.metrics` as d
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_3_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND normalized_app_name = "Firefox"
      AND metrics.custom_distribution.networking_http_3_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
),
android_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.fenix.metrics` as f
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_3_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND metrics.custom_distribution.networking_http_3_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
)
SELECT
    segment,
    branch,
    bucket,
    SUM(count) as counts
FROM
    (
Ngôn ngữ chính
Python
Star
1
Fork
5
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.