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

Function RM_GetUsedMemoryRatio

src/module.cpp:7764–7768  ·  view source on GitHub ↗

Return the a number between 0 to 1 indicating the amount of memory * currently used, relative to the Redis "maxmemory" configuration. * * * 0 - No memory limit configured. * * Between 0 and 1 - The percentage of the memory used normalized in 0-1 range. * * Exactly 1 - Memory limit reached. * * Greater 1 - More memory used than the configured limit. */

Source from the content-addressed store, hash-verified

7762 * * Greater 1 - More memory used than the configured limit.
7763 */
7764float RM_GetUsedMemoryRatio(){
7765 float level;
7766 getMaxmemoryState(NULL, NULL, NULL, &level);
7767 return level;
7768}
7769
7770/* --------------------------------------------------------------------------
7771 * ## Scanning keyspace and hashes

Callers

nothing calls this directly

Calls 1

getMaxmemoryStateFunction · 0.85

Tested by

no test coverage detected