Skip to content

internal/plots: refactor + add new go1.26 plots#142

Merged
arl merged 41 commits intomainfrom
1.26-plots/sched
Nov 16, 2025
Merged

internal/plots: refactor + add new go1.26 plots#142
arl merged 41 commits intomainfrom
1.26-plots/sched

Conversation

@arl
Copy link
Owner

@arl arl commented Nov 10, 2025

Major refactoring of the internal plot architecture: moved from monolithic plots.go and layouts.go files to one plot per file, self-registration, reducing sensibly the code by (666 lines) and improving maintainability.

Added support for new Go 1.26 scheduler metrics including a threads plot (/sched/threads/total:threads) and enhanced goroutines plot with granular state tracking (not-in-go, runnable, running, waiting).

Introduced auto-generated metric indices with build tag support for version-specific plots.

_example: cleanup by removing go.sum

Fix #119
Updates #139

arl added 30 commits November 7, 2025 16:05
Handle metric indices on a per go version basis (for now only
pre and post 1.26) and declare them as globals, thus allowing plot
description from not requiring to store them.

We now also don't need to have an object, since we need only need a
very thing state, if at all, to compute plot values from metrics. In
fact we just need a function. So declare the getvalues closure directly
in the declaration of each plot description{}.

With the additions of small wrappers to compute delta and rate from
metrics, the getvalues becomes very short and simple, much more maintable.
By calling mustidx in the global scope rather than in init(), we
ensure that metric indices are known when registering plots, which help
for dynamic layout building required for histograms.
@arl arl force-pushed the 1.26-plots/sched branch from 9058bb7 to 98d9b15 Compare November 15, 2025 12:44
@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 68.88889% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.94%. Comparing base (0141254) to head (084efb4).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
clients.go 73.33% 13 Missing and 3 partials ⚠️
statsviz.go 60.00% 10 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
+ Coverage   59.88%   61.94%   +2.05%     
==========================================
  Files           2        3       +1     
  Lines         177      226      +49     
==========================================
+ Hits          106      140      +34     
- Misses         66       77      +11     
- Partials        5        9       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arl arl merged commit 1004d62 into main Nov 16, 2025
10 checks passed
@arl arl deleted the 1.26-plots/sched branch November 16, 2025 00:56
This was referenced Nov 16, 2025
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.

statsviz.TimeSeries.GetValue is called multiple times per second

1 participant