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

Function inspectBuffers

packages/db/scripts/check-sessions.ts:127–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127async function inspectBuffers() {
128 const redis = getRedisCache();
129 const [eventCounter, sessionCounter, eventListLen, sessionListLen] =
130 await Promise.all([
131 redis.get('buffer-counter:event'),
132 redis.get('buffer-counter:session'),
133 redis.llen('event-buffer'),
134 redis.llen('session-buffer'),
135 ]);
136
137 return {
138 event: {
139 counter: Number(eventCounter ?? 0),
140 listLen: Number(eventListLen ?? 0),
141 },
142 session: {
143 counter: Number(sessionCounter ?? 0),
144 listLen: Number(sessionListLen ?? 0),
145 },
146 };
147}
148
149async function inspectClickhouse(
150 projects: string[] | null,

Callers 1

mainFunction · 0.85

Calls 2

getRedisCacheFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected