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

Method reportFlushStats

packages/db/src/buffers/base-buffer.ts:253–266  ·  view source on GitHub ↗

* Subclasses call this from within onFlush to record what they actually * did. The base class includes these in the FlushObservation it emits.

(stats: {
    rowsProcessed?: number;
    phases?: FlushPhaseTimings;
  })

Source from the content-addressed store, hash-verified

251 * did. The base class includes these in the FlushObservation it emits.
252 */
253 protected reportFlushStats(stats: {
254 rowsProcessed?: number;
255 phases?: FlushPhaseTimings;
256 }) {
257 if (stats.rowsProcessed !== undefined) {
258 this.inflightStats.rowsProcessed = stats.rowsProcessed;
259 }
260 if (stats.phases) {
261 this.inflightStats.phases = {
262 ...(this.inflightStats.phases ?? {}),
263 ...stats.phases,
264 };
265 }
266 }
267
268 /**
269 * Ground-truth size of the buffer (LLEN of the Redis list). O(1). The

Callers 6

processBufferMethod · 0.80
processBufferMethod · 0.80
processBufferMethod · 0.80
processBufferMethod · 0.80
processBufferMethod · 0.80
processBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected