Skip to content

Commit

Permalink
add annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
wujiasheng03 committed Apr 25, 2024
1 parent cc84474 commit 66a239c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lyrebird/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def broadcast_handler(self, callback_fn, event, args, kwargs):
finally:
event_end_time = time.time()
event_duration = (event_end_time - event_start_time) * 1000
if event.channel != 'lyrebird_metrics' and event_duration >= 1:
# Report the operation of Event
# Prevent loop reporting, and only time-consuming event(more than 1ms) are reported
if event.channel != 'lyrebird_metrics' and event_duration > 1:
trace_info = {
'channel': event.channel,
'callback_fn': callback_fn.__name__,
Expand Down

0 comments on commit 66a239c

Please sign in to comment.