diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index 8a95327f..f6fc44ec 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -1268,9 +1268,9 @@ class ChartPlotWidget(pg.PlotWidget): ''' profiler = pg.debug.Profiler( - msg=f'`{str(self)}.maxmin()` loop cycle for: `{self.name}`', + msg=f'`{str(self)}.maxmin(name={name})`: `{self.name}`', disabled=not pg_profile_enabled(), - gt=ms_slower_then, + ms_threshold=ms_slower_then, delayed=True, ) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index a2c99e38..b2b46050 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -762,7 +762,7 @@ class ChartView(ViewBox): profiler = pg.debug.Profiler( msg=f'`ChartView._set_yrange()`: `{self.name}`', disabled=not pg_profile_enabled(), - gt=ms_slower_then, + ms_threshold=ms_slower_then, delayed=True, ) set_range = True @@ -833,7 +833,7 @@ class ChartView(ViewBox): ylow, yhigh = yrange - profiler(f'maxmin(): {yrange}') + profiler(f'callback ._maxmin(): {yrange}') # view margins: stay within a % of the "true range" diff = yhigh - ylow @@ -932,8 +932,8 @@ class ChartView(ViewBox): # due to the way delaying works and garbage collection of # the profiler in the delegated method calls. delayed=False, - # gt=3, - gt=ms_slower_then, + ms_threshold=6, + # ms_threshold=ms_slower_then, ) # TODO: a faster single-loop-iterator way of doing this XD @@ -958,9 +958,7 @@ class ChartView(ViewBox): use_vr=True, # gets passed down into graphics obj - profiler=profiler, + # profiler=profiler, ) - profiler(f'range change updated {chart_name}:{name}') - - profiler.finish() + profiler(f'<{chart_name}>.update_graphics_from_flow({name})') diff --git a/piker/ui/_ohlc.py b/piker/ui/_ohlc.py index 328d62b9..6199b9ea 100644 --- a/piker/ui/_ohlc.py +++ b/piker/ui/_ohlc.py @@ -170,7 +170,7 @@ def gen_qpath( profiler = pg.debug.Profiler( msg='gen_qpath ohlc', disabled=not pg_profile_enabled(), - gt=ms_slower_then, + ms_threshold=ms_slower_then, ) x, y, c = path_arrays_from_ohlc( @@ -353,7 +353,7 @@ class BarItems(pg.GraphicsObject): # ''' # profiler = profiler or pg.debug.Profiler( # disabled=not pg_profile_enabled(), - # gt=ms_slower_then, + # ms_threshold=ms_slower_then, # delayed=True, # ) @@ -718,7 +718,7 @@ class BarItems(pg.GraphicsObject): profiler = pg.debug.Profiler( disabled=not pg_profile_enabled(), - gt=ms_slower_then, + ms_threshold=ms_slower_then, ) # p.setCompositionMode(0)