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

Method getForPromString

lib/histogram.js:108–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 }
107
108 async getForPromString() {
109 if (this.collect) {
110 const v = this.collect();
111 if (v instanceof Promise) await v;
112 }
113 const data = Object.values(this.hashMap);
114 const values = data
115 .map(extractBucketValuesForExport(this))
116 .reduce(addSumAndCountForExport(this), []);
117
118 return {
119 name: this.name,
120 help: this.help,
121 type: this.type,
122 values,
123 aggregator: this.aggregator,
124 };
125 }
126
127 reset() {
128 this.hashMap = {};

Callers 2

getMethod · 0.95
getMetricsAsStringMethod · 0.80

Calls 2

addSumAndCountForExportFunction · 0.85

Tested by

no test coverage detected