MCPcopy
hub / github.com/redis/node-redis / getStats

Method getStats

packages/test-utils/lib/proxy/redis-proxy.ts:176–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174 }
175
176 public getStats(): ProxyStats {
177 const connections = Array.from(this.connections.values());
178
179 return {
180 activeConnections: connections.length,
181 totalConnections: connections.length,
182 globalInterceptors: this.globalInterceptors.map(i => i.state),
183 connections: connections.map((conn) => ({
184 id: conn.id,
185 clientAddress: conn.clientAddress,
186 clientPort: conn.clientPort,
187 connectedAt: conn.connectedAt,
188 interceptors: conn.interceptors.map(i => i.state)
189 })),
190 };
191 }
192
193 public closeConnection(connectionId: string): boolean {
194 const connection = this.connections.get(connectionId);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected