Skip to content

Commit

Permalink
Add IsHot method to metricMiddleware
Browse files Browse the repository at this point in the history
Added a new method IsHot to the metricMiddleware struct in the tweetfinder to determine if a tweet stream is trending. This addition allows for more effective monitoring and prioritization of trending tweet streams, enhancing system performance and responsiveness.
  • Loading branch information
lueurxax committed Dec 23, 2023
1 parent 203822d commit a7afee8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/tweetfinder/metrics_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ type metricMiddleware struct {
findRequestsHistogramSeconds *prometheus.HistogramVec
}

func (m *metricMiddleware) IsHot() bool {
return m.next.IsHot()
}

func (m *metricMiddleware) CurrentTemp(ctx context.Context) float64 {
return m.next.CurrentTemp(ctx)
}
Expand Down

0 comments on commit a7afee8

Please sign in to comment.