Code Review
/
ric-plt
/
xapp-frame.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
dba83df
)
Gauge add
92/6392/1
v0.8.4
author
Juha Hyttinen
<juha.hyttinen@nokia.com>
Wed, 23 Jun 2021 07:54:57 +0000
(10:54 +0300)
committer
Juha Hyttinen
<juha.hyttinen@nokia.com>
Wed, 23 Jun 2021 07:55:04 +0000
(10:55 +0300)
Change-Id: I6e1fdec0741f9e0bbbf5c330a8d146095afc6a44
Signed-off-by: Juha Hyttinen <juha.hyttinen@nokia.com>
pkg/xapp/metrics.go
patch
|
blob
|
history
diff --git
a/pkg/xapp/metrics.go
b/pkg/xapp/metrics.go
index
f85c488
..
40adbcd
100644
(file)
--- a/
pkg/xapp/metrics.go
+++ b/
pkg/xapp/metrics.go
@@
-89,6
+89,12
@@
func (met *MetricGroupsCache) GSet(metric string, val float64) {
met.gauges[metric].Set(val)
}
+func (met *MetricGroupsCache) GAdd(metric string, val float64) {
+ met.RLock()
+ defer met.RUnlock()
+ met.gauges[metric].Add(val)
+}
+
func (met *MetricGroupsCache) GInc(metric string) {
met.RLock()
defer met.RUnlock()