Skip to content

Commit b91109a

Browse files
authored
fix log for mean_per_token_cost_time
1 parent a47942e commit b91109a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightllm/server/httpserver/manager.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,11 @@ async def generate(
180180
except:
181181
pass
182182
total_cost_time_ms = (time.time() - start_time) * 1000
183+
mean_per_token_cost_time_ms = (total_cost_time_ms - first_token_cost_ms) / out_token_counter
183184
logger.debug(
184185
f"req_id:{group_request_id},start:{start_time}s,first_token_cost:{first_token_cost_ms}ms\n"
185186
f"total_cost_time:{total_cost_time_ms}ms,out_token_counter:{out_token_counter}\n"
186-
f"mean_per_token_cost_time: {total_cost_time_ms/out_token_counter}ms\n"
187+
f"mean_per_token_cost_time: {mean_per_token_cost_time_ms}ms\n"
187188
f"prompt_token_num:{prompt_tokens}"
188189
)
189190
monitor.histogram_observe("lightllm_request_inference_duration", total_cost_time_ms)

0 commit comments

Comments
 (0)