MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getClientOutputBufferMemoryUsage

Function getClientOutputBufferMemoryUsage

src/networking.cpp:3812–3815  ·  view source on GitHub ↗

This function returns the number of bytes that Redis is * using to store the reply still not read by the client. * * Note: this function is very fast so can be called as many time as * the caller wishes. The main usage of this function currently is * enforcing the client output length limits. */

Source from the content-addressed store, hash-verified

3810 * the caller wishes. The main usage of this function currently is
3811 * enforcing the client output length limits. */
3812unsigned long getClientOutputBufferMemoryUsage(client *c) {
3813 unsigned long list_item_size = sizeof(listNode) + sizeof(clientReplyBlock);
3814 return c->reply_bytes + (list_item_size*listLength(c->reply)) + (c->replyAsync ? c->replyAsync->size : 0) + getClientReplicationBacklogSharedUsage(c);
3815}
3816
3817
3818

Tested by

no test coverage detected