@@ -788,7 +788,7 @@ void *RedisAI_RunSession(struct RedisAI_RunInfo **batch_rinfo) {
788788 }
789789
790790 RAI_Error * err = RedisModule_Calloc (1 , sizeof (RAI_Error ));
791- mstime_t rtime ;
791+ long long rtime ;
792792 int status ;
793793 RAI_ModelRunCtx * mctx = NULL ;
794794 RAI_ScriptRunCtx * sctx = NULL ;
@@ -804,14 +804,14 @@ void *RedisAI_RunSession(struct RedisAI_RunInfo **batch_rinfo) {
804804 sctx = batch_rinfo [0 ]-> sctx ;
805805 }
806806
807- const mstime_t start = mstime ();
807+ const long long start = ustime ();
808808 if (mctx ) {
809809 status = RAI_ModelRun (mctx , err );
810810 }
811811 else if (sctx ) {
812812 status = RAI_ScriptRun (sctx , err );
813813 }
814- rtime = mstime () - start ;
814+ rtime = ustime () - start ;
815815
816816 for (long long i = 0 ; i < array_len (batch_rinfo ); i ++ ) {
817817 struct RedisAI_RunInfo * rinfo = batch_rinfo [i ];
@@ -835,7 +835,7 @@ void *RedisAI_RunSession(struct RedisAI_RunInfo **batch_rinfo) {
835835 rinfo -> err = RedisModule_Calloc (1 , sizeof (RAI_Error ));
836836 // TODO: add information on whether the call was batched
837837 // and how large the batch was
838- rinfo -> rtime = rtime ;
838+ rinfo -> duration_us = rtime ;
839839
840840 memcpy (rinfo -> err , err , sizeof (RAI_Error ));
841841 if (rinfo -> client != NULL ) {
0 commit comments