MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / getBytesPerSecond

Method getBytesPerSecond

examples/worker-streaming/main.ts:121–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 }
120
121 getBytesPerSecond(): number {
122 if (this.times.length < 2) return 0;
123 const deltaMs = this.times[this.times.length - 1] - this.times[0];
124 if (deltaMs === 0) return 0;
125 const totalBytes = this.bytes.reduce((sum, b) => sum + b, 0);
126 return (totalBytes / deltaMs) * 1000;
127 }
128}
129
130async function main(): Promise<void> {

Callers 1

streamFrameFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected