Skip to content

Commit

Permalink
executor: do not capture the plan cache in stats
Browse files Browse the repository at this point in the history
Signed-off-by: Vicent Marti <[email protected]>
  • Loading branch information
vmg committed Sep 14, 2021
1 parent 517b080 commit 94ec73e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions go/vt/vtgate/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,15 @@ func NewExecutor(
stats.NewGaugeFunc("QueryPlanCacheLength", "Query plan cache length", func() int64 {
return int64(e.plans.Len())
})
stats.NewGaugeFunc("QueryPlanCacheSize", "Query plan cache size", e.plans.UsedCapacity)
stats.NewGaugeFunc("QueryPlanCacheCapacity", "Query plan cache capacity", e.plans.MaxCapacity)
stats.NewCounterFunc("QueryPlanCacheEvictions", "Query plan cache evictions", e.plans.Evictions)
stats.NewGaugeFunc("QueryPlanCacheSize", "Query plan cache size", func() int64 {
return e.plans.UsedCapacity()
})
stats.NewGaugeFunc("QueryPlanCacheCapacity", "Query plan cache capacity", func() int64 {
return e.plans.MaxCapacity()
})
stats.NewCounterFunc("QueryPlanCacheEvictions", "Query plan cache evictions", func() int64 {
return e.plans.Evictions()
})
http.Handle(pathQueryPlans, e)
http.Handle(pathScatterStats, e)
http.Handle(pathVSchema, e)
Expand Down

0 comments on commit 94ec73e

Please sign in to comment.