MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / avg

Function avg

apps/api/src/agents/tools/session.ts:154–155  ·  view source on GitHub ↗
(sel: (s: typeof sample[number]) => number)

Source from the content-addressed store, hash-verified

152 }
153
154 const avg = (sel: (s: typeof sample[number]) => number) =>
155 sample.reduce((s, sess) => s + sel(sess), 0) / sample.length;
156
157 const project_avg = {
158 duration: avg((s) => s.duration),

Callers 1

session.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected