refactor: reduce parameter count of bandwidthChecker.windowMetricLabels - #182
Conversation
…etric SonarCloud flagged emitWindowMetric at a cognitive complexity of 19 against a limit of 15 (from #180, merged before this fix landed). Extracts the threshold evaluation and label-building into their own functions - no behavior change.
|
Claude finished @joshiste's task in 1m 2s —— View job Claude finished @unknown's taskTasks:
ReviewThis is a clean, mechanical refactor exactly as described:
One very minor style nit (not flagging as an issue per review scope): Note: I was unable to run No bugs, security issues, or concurrency problems found. Looks good to merge. |
|



Summary
Follow-up to #181, which itself was a follow-up to #180. SonarCloud flagged
windowMetricLabels(introduced in #181) at 9 parameters against the 7 allowed - #181 merged before this could be folded in, so it's a separate small PR. Bundles the parameters into awindowSnapshotstruct; no behavior change.Test plan
go test ./exthttpcheck/...(including-race) passesgo build,go vet,gofmt -lclean