Skip to content

Add trendline estimator#30

Open
mengelbart wants to merge 1 commit intomasterfrom
feat/trendline-estimator
Open

Add trendline estimator#30
mengelbart wants to merge 1 commit intomasterfrom
feat/trendline-estimator

Conversation

@mengelbart
Copy link
Contributor

The trendline estimator will be used to estimate the slope of inter-arrival times. It is a simpler alternative to the Kalman filter.

@mengelbart mengelbart requested a review from JoTurk March 4, 2026 10:25
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f44ede8) to head (0b28bb2).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #30   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines          146       200   +54     
=========================================
+ Hits           146       200   +54     
Flag Coverage Δ
go 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@mengelbart mengelbart force-pushed the feat/trendline-estimator branch from 4ecc97a to 0b28bb2 Compare March 4, 2026 10:27
Comment on lines +61 to +63
smoothedDelayMs := e.smoothingCoeff*float64(e.smoothedDelay.Milliseconds()) +
(1-e.smoothingCoeff)*float64(e.accumulatedDelay.Milliseconds())
e.smoothedDelay = time.Duration(smoothedDelayMs * float64(time.Millisecond))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can make this float instead of truncating to ms.


trend, ok := fitSlope(e.history)
if !ok {
trend = e.previousTrend
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't seem to set previousTrend is this intended for future work?

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