Skip to content

Commit 43da311

Browse files
committed
log the number milliseconds onnx is running
1 parent 46ec87d commit 43da311

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backends/onnx_timeout.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ void RAI_ResetRunSessionCtxORT(long run_session_index) {
116116
do {
117117
state = __atomic_load_n(entry->runState, __ATOMIC_RELAXED);
118118
} while (state != RUN_SESSION_ACTIVE && state != RUN_SESSION_TERMINATED);
119-
119+
long long time_now = mstime();
120+
RedisModule_Log(NULL, "notice", "run time is: %lld\n", time_now-entry->queuingTime);
120121
ort->ReleaseRunOptions(entry->runOptions);
121122
__atomic_store_n(&(entry->queuingTime), LLONG_MAX, __ATOMIC_RELAXED);
122123
__atomic_store_n(entry->runState, RUN_SESSION_AVAILABLE, __ATOMIC_RELAXED);

0 commit comments

Comments
 (0)