MCPcopy Index your code
hub / github.com/Effect-TS/effect / getBuckets

Function getBuckets

packages/effect/src/internal/metric/hook.ts:194–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192 }
193
194 const getBuckets = (): ReadonlyArray<readonly [number, number]> => {
195 const builder: Array<readonly [number, number]> = Arr.allocate(size) as any
196 let cumulated = 0
197 for (let i = 0; i < size; i++) {
198 const boundary = boundaries[i]
199 const value = values[i]
200 cumulated = cumulated + value
201 builder[i] = [boundary, cumulated]
202 }
203 return builder
204 }
205
206 return make({
207 get: () =>

Callers 1

histogramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected