Remove per minute count
This commit is contained in:
parent
9aad0aa428
commit
f884f0809f
@ -191,8 +191,6 @@ func QueueRequest(ctx context.Context) {
|
|||||||
if err := limiter.WaitN(ctx, consume); err != nil {
|
if err := limiter.WaitN(ctx, consume); err != nil {
|
||||||
logger.CtxErr(ctx, err).Error("graph middleware waiting on the limiter")
|
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.
|
// RateLimiterMiddleware is used to ensure we don't overstep per-min request limits.
|
||||||
|
|||||||
@ -48,9 +48,6 @@ type SkippedCounts struct {
|
|||||||
|
|
||||||
type APIStats struct {
|
type APIStats struct {
|
||||||
TokensConsumed int64 `json:"tokensConsumed"`
|
TokensConsumed int64 `json:"tokensConsumed"`
|
||||||
// PeakTokenUsage is the maximum number of tokens used during a
|
|
||||||
// rolling 1 minute window.
|
|
||||||
PeakTokenUsagePerMin int64 `json:"peakTokenUsage"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetAPIStats(
|
func GetAPIStats(
|
||||||
@ -59,7 +56,6 @@ func GetAPIStats(
|
|||||||
s := APIStats{}
|
s := APIStats{}
|
||||||
|
|
||||||
s.TokensConsumed = ctr.Total(count.APICallTokensConsumed)
|
s.TokensConsumed = ctr.Total(count.APICallTokensConsumed)
|
||||||
s.PeakTokenUsagePerMin = ctr.Get(count.PeakAPITokenUsagePerMin)
|
|
||||||
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user