MCPcopy Index your code
hub / github.com/prometheus/client_js / getValueByLabel

Function getValueByLabel

test/histogramTest.js:492–499  ·  view source on GitHub ↗
(label, values, key)

Source from the content-addressed store, hash-verified

490 }, {});
491 }
492 function getValueByLabel(label, values, key) {
493 return values.reduce((acc, val) => {
494 if (val.labels && val.labels[key || 'le'] === label) {
495 acc = val;
496 }
497 return acc;
498 }, {});
499 }
500 function getValuesByLabel(label, values, key) {
501 return values.reduce((acc, val) => {
502 if (val.labels && val.labels[key || 'le'] === label) {

Callers 1

histogramTest.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected