@@ -1024,6 +1024,16 @@ static int RedisAI_RegisterApi(RedisModuleCtx* ctx) {
10241024 return REDISMODULE_OK ;
10251025}
10261026
1027+ void RAI_moduleInfoFunc (RedisModuleInfoCtx * ctx , int for_crash_report ) {
1028+ RedisModule_InfoAddSection (ctx , "git" );
1029+ RedisModule_InfoAddFieldCString (ctx , "git_sha" , REDISAI_GIT_SHA );
1030+
1031+ RedisModule_InfoAddSection (ctx , "load_time_configs" );
1032+ RedisModule_InfoAddFieldLongLong (ctx , "threads_per_queue" , perqueueThreadPoolSize );
1033+ RedisModule_InfoAddFieldLongLong (ctx , "inter_op_parallelism" , getBackendsInterOpParallelism ());
1034+ RedisModule_InfoAddFieldLongLong (ctx , "intra_op_parallelism" , getBackendsIntraOpParallelism ());
1035+ }
1036+
10271037int RedisModule_OnLoad (RedisModuleCtx * ctx , RedisModuleString * * argv , int argc ) {
10281038
10291039 if (RedisModule_Init (ctx , "ai" , RAI_ENC_VER , REDISMODULE_APIVER_1 )
@@ -1044,6 +1054,10 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
10441054 return REDISMODULE_ERR ;
10451055 }
10461056
1057+ if (redisMajorVersion >= 6 ){
1058+ if (RedisModule_RegisterInfoFunc (ctx , RAI_moduleInfoFunc ) == REDISMODULE_ERR ) return REDISMODULE_ERR ;
1059+ }
1060+
10471061 RedisModule_Log (ctx , "notice" , "RedisAI version %d, git_sha=%s" ,
10481062 RAI_ENC_VER , REDISAI_GIT_SHA );
10491063
0 commit comments