(histogram)
| 288 | } |
| 289 | |
| 290 | function extractBucketValuesForExport(histogram) { |
| 291 | const name = `${histogram.name}_bucket`; |
| 292 | return bucketData => { |
| 293 | let acc = 0; |
| 294 | const buckets = histogram.upperBounds.map(upperBound => { |
| 295 | acc += bucketData.bucketValues[upperBound]; |
| 296 | return setValuePair( |
| 297 | { le: upperBound }, |
| 298 | acc, |
| 299 | name, |
| 300 | bucketData.bucketExemplars |
| 301 | ? bucketData.bucketExemplars[upperBound] |
| 302 | : null, |
| 303 | bucketData.labels, |
| 304 | ); |
| 305 | }); |
| 306 | return { buckets, data: bucketData }; |
| 307 | }; |
| 308 | } |
| 309 | |
| 310 | function addSumAndCountForExport(histogram) { |
| 311 | return (acc, d) => { |
no test coverage detected