Return the max samples in the memory usage of clients tracked by * the function clientsCronTrackExpansiveClients(). */
| 1952 | /* Return the max samples in the memory usage of clients tracked by |
| 1953 | * the function clientsCronTrackExpansiveClients(). */ |
| 1954 | void getExpansiveClientsInfo(size_t *in_usage, size_t *out_usage) { |
| 1955 | size_t i = 0, o = 0; |
| 1956 | for (int j = 0; j < CLIENTS_PEAK_MEM_USAGE_SLOTS; j++) { |
| 1957 | if (ClientsPeakMemInput[j] > i) i = ClientsPeakMemInput[j]; |
| 1958 | if (ClientsPeakMemOutput[j] > o) o = ClientsPeakMemOutput[j]; |
| 1959 | } |
| 1960 | *in_usage = i; |
| 1961 | *out_usage = o; |
| 1962 | } |
| 1963 | |
| 1964 | int closeClientOnOverload(client *c) { |
| 1965 | if (g_pserver->overload_closed_clients > MAX_CLIENTS_SHED_PER_PERIOD) return false; |
no outgoing calls
no test coverage detected