Skip to content

Commit

Permalink
Only throttle warn on rate >= display rate
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Feb 17, 2022
1 parent 78e5394 commit a90d205
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion piker/ui/_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ async def graphics_update_loop(
# of copying it from last bar's close
# - 1-5 sec bar lookback-autocorrection like tws does?
# (would require a background history checker task)
display_rate = linked.godwidget.window.current_screen().refreshRate()

chart = linked.chart

Expand Down Expand Up @@ -215,7 +216,8 @@ async def graphics_update_loop(

# in the absolute worst case we shouldn't see more then
# twice the expected throttle rate right!?
and quote_rate >= _quote_throttle_rate * 1.5
# and quote_rate >= _quote_throttle_rate * 2
and quote_rate >= display_rate
):
log.warning(f'High quote rate {symbol.key}: {quote_rate}')

Expand Down

0 comments on commit a90d205

Please sign in to comment.