Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Visible time on a dashboard route

オープン
#2,153 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, python, redis

調査の方向性

Start by locating the dashboard route handling, generated route list, beacon handler, Redis visit storage, histogram definitions, and UTC-day cron job. Run the existing dashboard metrics tests, then add the listed visible-time, route-change, pagehide, hidden-tab, expiry, and metric-isolation cases. Done means each visit contributes at most one sample with the required route label and bounds.

索引モデルが issue の本文から書いたものです。

説明

Problem

Visible time is how long a route stayed in the foreground. The dashboard is a single-page app, so leaving a screen is a route change, and a tab in the background is still open. A visit that never sends its ending is infinite.

Proposal

Record visible time in the dashboard UI. Start a timer when a route opens. Pause it while document.visibilityState is hidden.

Send two beacons with navigator.sendBeacon. Each one carries a visit id and the route id. The route id keeps its parameters (/tree/$treeName/$branch, /hardware/$hardwareId). The handler accepts only route ids from the generated route list. The visit id is the Redis key. The histogram label is route.

  • The open beacon stores the visit in Redis.
  • The beacon on route change or pagehide observes dashboard_route_visible_seconds with the elapsed visible seconds, clamped at 86400, and deletes the key.

Buckets are 5, 15, 30, 60, 120, 300, 600, 1800, 86400, and +Inf. The board shows p50 and p95 per route. A finished visit stays at or under 86400, so the +Inf bucket is the visit that never ended.

At the end of the UTC day, a cron observes +Inf for every visit key still open and deletes it. The histogram is written once per visit. The handler records dashboard_route_visible_seconds only, and these beacons stay off dashboard_backend_requests_by_client_total, the latency histogram, and the unique-visitor count.

Tests

  • A visible stay of 20s on /tree/$treeName/$branch, then a route change, observes 20 on dashboard_route_visible_seconds for that route, and the Redis key is gone.
  • 30s with the tab hidden is not part of that sample.
  • A route left open through the end of the UTC day observes +Inf for that route.
  • A beacon for that visit after the cron does not add a second sample.
  • The beacon request does not increment dashboard_backend_requests_by_client_total.
主要言語
Python
スター
9
フォーク
31
平均マージ
5日 22時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kernelci/dashboard のほかの issue

kernelci/dashboard の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。