-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetrics.patch
More file actions
50 lines (47 loc) · 1.63 KB
/
Copy pathmetrics.patch
File metadata and controls
50 lines (47 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff --git a/regexp_cache.go b/regexp_cache.go
index e9d49bb..0fcdab9 100644
--- a/regexp_cache.go
+++ b/regexp_cache.go
@@ -4,8 +4,6 @@ import (
"regexp"
"sync"
"sync/atomic"
-
- "github.com/VictoriaMetrics/metrics"
)
// CompileRegexpAnchored returns compiled regexp `^re$`.
@@ -37,21 +35,21 @@ const regexpCacheCharsMax = 1e6
var regexpCacheV = func() *regexpCache {
rc := newRegexpCache(regexpCacheCharsMax)
- metrics.NewGauge(`vm_cache_requests_total{type="promql/regexp"}`, func() float64 {
- return float64(rc.Requests())
- })
- metrics.NewGauge(`vm_cache_misses_total{type="promql/regexp"}`, func() float64 {
- return float64(rc.Misses())
- })
- metrics.NewGauge(`vm_cache_entries{type="promql/regexp"}`, func() float64 {
- return float64(rc.Len())
- })
- metrics.NewGauge(`vm_cache_chars_current{type="promql/regexp"}`, func() float64 {
- return float64(rc.CharsCurrent())
- })
- metrics.NewGauge(`vm_cache_chars_max{type="promql/regexp"}`, func() float64 {
- return float64(rc.charsLimit)
- })
+ //metrics.NewGauge(`vm_cache_requests_total{type="promql/regexp"}`, func() float64 {
+ // return float64(rc.Requests())
+ //})
+ //metrics.NewGauge(`vm_cache_misses_total{type="promql/regexp"}`, func() float64 {
+ // return float64(rc.Misses())
+ //})
+ //metrics.NewGauge(`vm_cache_entries{type="promql/regexp"}`, func() float64 {
+ // return float64(rc.Len())
+ //})
+ //metrics.NewGauge(`vm_cache_chars_current{type="promql/regexp"}`, func() float64 {
+ // return float64(rc.CharsCurrent())
+ //})
+ //metrics.NewGauge(`vm_cache_chars_max{type="promql/regexp"}`, func() float64 {
+ // return float64(rc.charsLimit)
+ //})
return rc
}()