Skip to content

Commit

Permalink
fix: control the metric set frequency (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
shihaobai committed Jul 8, 2024
1 parent e7e9490 commit b8155f0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lightllm/server/router/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ async def loop_for_fwd(
else:
self.shared_token_load.set_dynamic_max_load(0.0)
self.shared_token_load.set_current_load(0.0)
self.metric_client.gauge_set("lightllm_batch_current_size", 0.0)
self.metric_client.gauge_set("lightllm_batch_pause_size", 0.0)
self.metric_client.gauge_set("lightllm_queue_size", 0.0)
self.metric_client.gauge_set("lightllm_batch_current_max_tokens", 0.0)
if counter_count % 100 == 0:
self.metric_client.gauge_set("lightllm_batch_current_size", 0.0)
self.metric_client.gauge_set("lightllm_batch_pause_size", 0.0)
self.metric_client.gauge_set("lightllm_queue_size", 0.0)
self.metric_client.gauge_set("lightllm_batch_current_max_tokens", 0.0)

if self.running_batch is None:
await asyncio.sleep(0.01) # 10ms
Expand Down

0 comments on commit b8155f0

Please sign in to comment.