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

Function LRUTestGenKey

app/redis-6.2.6/src/redis-cli.c:8115–8118  ·  view source on GitHub ↗

Generates a key name among a set of lru_test_sample_size keys, using * an 80-20 distribution. */

Source from the content-addressed store, hash-verified

8113/* Generates a key name among a set of lru_test_sample_size keys, using
8114 * an 80-20 distribution. */
8115void LRUTestGenKey(char *buf, size_t buflen) {
8116 snprintf(buf, buflen, "lru:%lld",
8117 powerLawRand(1, config.lru_test_sample_size, 6.2));
8118}
8119
8120#define LRU_CYCLE_PERIOD 1000 /* 1000 milliseconds. */
8121#define LRU_CYCLE_PIPELINE_SIZE 250

Callers 1

LRUTestModeFunction · 0.85

Calls 2

snprintfFunction · 0.85
powerLawRandFunction · 0.85

Tested by

no test coverage detected