Hive Hive
Sign in

feat(server, noora): rework Xcode Cache widgets with transfer/latency/throughput splits

GitHub issue · Closed

Metadata
Source
tuist/tuist #10924
Updated
Jun 24, 2026
Domains
Atlas
Details

Purpose

Reworks the Xcode Cache page widgets so users can see a combined view of every cache metric alongside the underlying split.

  • Replaces the separate Cache downloads + Cache uploads widgets with a single Cache transfer widget that has a dropdown to switch between combined, downloads, and uploads.
  • Adds a Cache latency widget (combined / read / write) and a Cache throughput widget (combined / downloads / uploads). Both follow the same dropdown widget pattern as the cache hit rate widget.
  • Each chart now renders three lines (combined + the two split series), and each widget gets a distinct default color (transfer orange, latency pink, throughput yellow) wired through the legend bar, dropdown dot, and chart line so they read as a row of four rather than a sea of purple.

Data source

All three new analytics derive from the existing per-task cas_outputs ClickHouse table that the Tuist CLI / Xcode CAS plugin already writes at build completion. That table carries size, compressed_size, duration, and operation for every upload/download, so no schema changes or new client-side instrumentation are needed.

Project-level aggregation joins cas_outputs with build_runs on project_id and is consolidated through a single cas_action_metrics/3 helper that returns size/duration/count buckets plus current and previous-period totals — the public functions (cas_uploads_analytics, cas_downloads_analytics, cas_transfer_analytics, cas_latency_analytics, cas_throughput_analytics) all derive from it. Latency is the event-count-weighted average across the chosen actions; throughput is total bytes divided by total duration.

Other notes for reviewers

  • New generic SplitDropdownWidget component (lives next to PercentileDropdownWidget) — could be reused for other combined/split metrics later.
  • New formatBytesPerSecond Noora chart formatter for throughput axes/tooltips.
  • Per-widget dropdown selection is persisted via transfer-type, latency-type, throughput-type query params.
  • Includes a changelog entry under server/priv/marketing/changelog/.
  • No migrations and no changes to Kura, the cache webhook, or cas_events — the original draft of this PR added a duration_ms column there before realising cas_outputs already had the data.

How to test locally

  1. mise run dev and open a project with cacheable build runs at /<account>/<project>/xcode-cache.
  2. Confirm the four widgets render with distinct legend colors (purple / orange / pink / yellow) and that each opens a dropdown matching the cache hit rate widget.
  3. Click each widget to switch the chart below — chart should show three lines whose colors match the widget legend.
  4. Use the dropdown on each widget to switch the headline value between combined / downloads / uploads (or read / write for latency) and verify the legend bar color updates accordingly.
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments

No GitHub comments yet.