Skip to content

Show the traffic rate over the last five seconds - #327

Merged
hatstand merged 1 commit into
masterfrom
claude/traffic-moving-average
Oct 5, 2026
Merged

hatstand merged 1 commit into
masterfrom
claude/traffic-moving-average

Conversation

@hatstand

@hatstand hatstand commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

The connection sheet's "(avg / sec)" was total bytes since connecting ÷ seconds since connecting. After streaming stopped it only fell off as 1/t: 5 minutes at 400 KB/s then 5 idle minutes still read about 200 KB/s.

It's now the rate over the last five seconds. The sheet already reads the byte counts twice a second, so TrafficRate keeps the readings from the last five seconds and divides the bytes between the oldest and newest by the time between them. The rate reaches 0 within five seconds of traffic stopping. It's left out for the first half-second after the sheet opens, until there are two readings to compare. The totals are still since connecting.

Same change on iOS: clementine-player/iOS-Remote, branch claude/traffic-moving-average, with the same release note.

Tests: TrafficRateTest. Not built here: the session had no Android SDK, so CI is the first build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CTf1Z6GAbDbQeNJ5BkewC1


Generated by Claude Code

The connection sheet's rate was the average since connecting, so after
streaming stopped it took ages to fall, and read as if data were still
moving. It's now the rate over the last five seconds, from the readings
the sheet already takes twice a second, and it's left out until there are
two readings to compare.

Release-note: The connection details show how fast data is moving now, rather than the average since connecting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CTf1Z6GAbDbQeNJ5BkewC1

hatstand commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

build failed in testFdroidDebugUnitTest, but not because of this PR. All 37 failures are Robolectric test classes that couldn't download org.robolectric:android-all-instrumented:16-robolectric-13921718-i7 from Maven Central: HTTP 403 for repo1.maven.org/.../android-all-instrumented-16-robolectric-13921718-i7.pom.sha512. They failed before any test body ran. The new TrafficRateTest is plain JUnit, so it needs no Robolectric jar, and it passed.

No fix in this repo is needed. I'll re-run the failed job once when the rest of this workflow run finishes; it's still running, so GitHub won't re-run it yet.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Store screenshots

From run 37342449972, against clementine-it. Left: the store listing of the latest release, v13.7, which shows the dark theme. Right: this pull request, dark and light.

Screen v13.7 This PR, dark This PR
1_player
2_library
2_library_album
3_playlist
4_search
5_connection
6_connect
10_internet –
11_internet_radio –
settings –

@hatstand
hatstand merged commit db69461 into master Oct 5, 2026
9 of 10 checks passed
@hatstand
hatstand deleted the claude/traffic-moving-average branch October 5, 2026 17:33
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