Skip to content

Commit

Permalink
fix log for mean_per_token_cost_time (#438) (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiworldwzj authored Jun 14, 2024
1 parent a2be0e4 commit eff94a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lightllm/server/httpserver/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ async def generate(
except:
pass
total_cost_time_ms = (time.time() - start_time) * 1000
mean_per_token_cost_time_ms = (total_cost_time_ms - first_token_cost_ms) / out_token_counter
logger.debug(
f"req_id:{group_request_id},start:{start_time}s,first_token_cost:{first_token_cost_ms}ms\n"
f"total_cost_time:{total_cost_time_ms}ms,out_token_counter:{out_token_counter}\n"
f"mean_per_token_cost_time: {total_cost_time_ms/out_token_counter}ms\n"
f"mean_per_token_cost_time: {mean_per_token_cost_time_ms}ms\n"
f"prompt_token_num:{prompt_tokens}"
)
monitor.histogram_observe("lightllm_request_inference_duration", total_cost_time_ms)
Expand Down

0 comments on commit eff94a4

Please sign in to comment.