| 6498 | } |
| 6499 | |
| 6500 | static 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 | |
| 6515 | static int RedisGearsPy_DumpRequirements(RedisModuleCtx *ctx, RedisModuleString **argv, int argc){ |
| 6516 |
nothing calls this directly
no test coverage detected