MCPcopy
hub / github.com/prometheus/client_js / setValue

Function setValue

lib/counter.js:138–145  ·  view source on GitHub ↗
(hashMap, value, labels = {}, hash = '')

Source from the content-addressed store, hash-verified

136}
137
138function setValue(hashMap, value, labels = {}, hash = '') {
139 if (hashMap[hash]) {
140 hashMap[hash].value += value;
141 } else {
142 hashMap[hash] = { value, labels };
143 }
144 return hashMap;
145}
146
147module.exports = Counter;

Callers 4

resetMethod · 0.85
setFunction · 0.85
incWithoutExemplarMethod · 0.85
resetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected