Skip to content

Commit

Permalink
add push mertics log. (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiworldwzj authored Sep 2, 2024
1 parent 9885095 commit 1dad7c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lightllm/server/metrics/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ def exposed_generate_latest(self) -> bytes:
return data

def push_metrics(self):
time_counter = 0
while True:
try:
self.monitor.push_metrices()
if time_counter >= 60:
logger.info("push metrices success")
time_counter = 0
finally:
time.sleep(self.interval)
time_counter += self.interval


class MetricClient(threading.Thread):
Expand Down

0 comments on commit 1dad7c0

Please sign in to comment.