Remove per minute count

This commit is contained in:
Abhishek Pandey 2023-10-10 03:22:33 +05:30
parent 9aad0aa428
commit f884f0809f
2 changed files with 0 additions and 6 deletions

View File

@ -191,8 +191,6 @@ func QueueRequest(ctx context.Context) {
if err := limiter.WaitN(ctx, consume); err != nil {
logger.CtxErr(ctx, err).Error("graph middleware waiting on the limiter")
}
// Add to the count bus
}
// RateLimiterMiddleware is used to ensure we don't overstep per-min request limits.

View File

@ -48,9 +48,6 @@ type SkippedCounts struct {
type APIStats struct {
TokensConsumed int64 `json:"tokensConsumed"`
// PeakTokenUsage is the maximum number of tokens used during a
// rolling 1 minute window.
PeakTokenUsagePerMin int64 `json:"peakTokenUsage"`
}
func GetAPIStats(
@ -59,7 +56,6 @@ func GetAPIStats(
s := APIStats{}
s.TokensConsumed = ctr.Total(count.APICallTokensConsumed)
s.PeakTokenUsagePerMin = ctr.Get(count.PeakAPITokenUsagePerMin)
return s
}