Skip to content

frontend: store: Divide disk write rate by linux2rest sample window - #4175

Merged
patrickelectric merged 2 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix/disk-widget-write-rate-sample-interval
Aug 18, 2026
Merged

frontend: store: Divide disk write rate by linux2rest sample window#4175
patrickelectric merged 2 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix/disk-widget-write-rate-sample-interval

Conversation

@joaoantoniocardoso

@joaoantoniocardoso joaoantoniocardoso commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • The tray disk widget (W: … MB/s) treated each available_space_B jump as happening over the 2 s frontend poll. linux2rest only refreshes that snapshot every 5 s, so a ~2.1 MB/s recording showed as ~5.0–5.1 MB/s, then stuck there because a later zero delta kept the inflated rate.
  • Divide capacity deltas by the same 5 s Sampler window already used for network (linux2restProbeRateBps). Match disks by mount_point (many bind mounts share name: /dev/root). Drop unused Disk.last_update.
  • No linux2rest API change. Self-hosted frontend against a vehicle writing ~2 MB/s showed W: 2.0 MB/s.

Helps #4172: this PR doesn't solve it, but at least we get a correct reading from the widget
Related (not required for this PR): patrickelectric/linux2rest#38

Test plan

  • Self-host core/frontend with BLUEOS_ADDRESS=http://<vehicle>/ yarn dev
  • With a sustained ~16 Mbps recording (or any ~2 MB/s writer), tray shows ~2 MB/s, not ~5 MB/s, and holds there across several 2 s polls
  • After stopping the writer, rate drops toward zero on the next non-zero capacity change
  • Disk fill still updates (xx/yyGB (zz%))
  • Network tray rates still look sane (this PR reuses their helper, does not change that path)

@joaoantoniocardoso
joaoantoniocardoso force-pushed the fix/disk-widget-write-rate-sample-interval branch 2 times, most recently from 5f875ca to b2fe8bd Compare August 18, 2026 14:54
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review August 18, 2026 14:55
@github-actions

This comment was marked as resolved.

@joaoantoniocardoso
joaoantoniocardoso force-pushed the fix/disk-widget-write-rate-sample-interval branch from b2fe8bd to 0c908f9 Compare August 18, 2026 15:06
@joaoantoniocardoso
joaoantoniocardoso requested a review from a team August 18, 2026 15:39
@patrickelectric
patrickelectric merged commit c2301bd into bluerobotics:master Aug 18, 2026
7 checks passed
@patrickelectric

Copy link
Copy Markdown
Member

Because 1 approve is not enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants