From 3c6c30004250c2e7ca7e9db1f22a9f2e43ced82c Mon Sep 17 00:00:00 2001 From: jhen Date: Fri, 10 Nov 2023 14:45:42 +0800 Subject: [PATCH] fix(android): type of prompt_per_second / predicted_per_second in timings --- android/src/main/jni.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/jni.cpp b/android/src/main/jni.cpp index 45ecc65..e1c20df 100644 --- a/android/src/main/jni.cpp +++ b/android/src/main/jni.cpp @@ -450,11 +450,11 @@ Java_com_rnllama_LlamaContext_doCompletion( putInt(env, timingsResult, "prompt_n", timings.n_p_eval); putInt(env, timingsResult, "prompt_ms", timings.t_p_eval_ms); putInt(env, timingsResult, "prompt_per_token_ms", timings.t_p_eval_ms / timings.n_p_eval); - putInt(env, timingsResult, "prompt_per_second", 1e3 / timings.t_p_eval_ms * timings.n_p_eval); + putDouble(env, timingsResult, "prompt_per_second", 1e3 / timings.t_p_eval_ms * timings.n_p_eval); putInt(env, timingsResult, "predicted_n", timings.n_eval); putInt(env, timingsResult, "predicted_ms", timings.t_eval_ms); putInt(env, timingsResult, "predicted_per_token_ms", timings.t_eval_ms / timings.n_eval); - putInt(env, timingsResult, "predicted_per_second", 1e3 / timings.t_eval_ms * timings.n_eval); + putDouble(env, timingsResult, "predicted_per_second", 1e3 / timings.t_eval_ms * timings.n_eval); putMap(env, result, "timings", timingsResult);