MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getExpansiveClientsInfo

Function getExpansiveClientsInfo

app/redis-6.2.6/src/server.c:1775–1783  ·  view source on GitHub ↗

Return the max samples in the memory usage of clients tracked by * the function clientsCronTrackExpansiveClients(). */

Source from the content-addressed store, hash-verified

1773/* Return the max samples in the memory usage of clients tracked by
1774 * the function clientsCronTrackExpansiveClients(). */
1775void getExpansiveClientsInfo(size_t *in_usage, size_t *out_usage) {
1776 size_t i = 0, o = 0;
1777 for (int j = 0; j < CLIENTS_PEAK_MEM_USAGE_SLOTS; j++) {
1778 if (ClientsPeakMemInput[j] > i) i = ClientsPeakMemInput[j];
1779 if (ClientsPeakMemOutput[j] > o) o = ClientsPeakMemOutput[j];
1780 }
1781 *in_usage = i;
1782 *out_usage = o;
1783}
1784
1785/* This function is called by serverCron() and is used in order to perform
1786 * operations on clients that are important to perform constantly. For instance

Callers 1

genRedisInfoStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected