MCPcopy Create free account
hub / github.com/RedisGears/RedisGears / RedisGearsPy_Profile

Function RedisGearsPy_Profile

plugins/python/redisgears_python.c:6500–6513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6498}
6499
6500static int RedisGearsPy_Profile(RedisModuleCtx *ctx, RedisModuleString **argv, int argc){
6501 if (argc < 2) {
6502 return RedisModule_WrongArity(ctx);
6503 }
6504 const char* subCommand = RedisModule_StringPtrLen(argv[1], NULL);
6505 if (strcasecmp(subCommand, "stats") == 0) {
6506 return RedisGearsPy_ProfileStats(ctx, argv + 2, argc - 2);
6507 } else if (strcasecmp(subCommand, "reset") == 0) {
6508 return RedisGearsPy_ProfileReset(ctx, argv + 2, argc - 2);
6509 }
6510
6511 RedisModule_ReplyWithError(ctx, "Wrong subcommand given to RG.PYPROFILE");
6512 return REDISMODULE_OK;
6513}
6514
6515static int RedisGearsPy_DumpRequirements(RedisModuleCtx *ctx, RedisModuleString **argv, int argc){
6516

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected