summaryrefslogtreecommitdiff
path: root/tools/perf/python
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/python')
-rwxr-xr-xtools/perf/python/treport.py5
-rwxr-xr-xtools/perf/python/ttimechart.py5
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/python/treport.py b/tools/perf/python/treport.py
index e02121475370..fb583786b17a 100755
--- a/tools/perf/python/treport.py
+++ b/tools/perf/python/treport.py
@@ -638,8 +638,9 @@ class ReportApp(App):
@work(thread=True, exclusive=True)
def load_profile(self) -> None:
"""Build the profile in a thread so the UI stays responsive."""
- profile = self.loading
- assert profile is not None
+ loading = self.loading
+ assert loading is not None
+ profile = loading
def progress() -> None:
try:
diff --git a/tools/perf/python/ttimechart.py b/tools/perf/python/ttimechart.py
index 34ecf84e68c1..d7ba0276a9fb 100755
--- a/tools/perf/python/ttimechart.py
+++ b/tools/perf/python/ttimechart.py
@@ -1676,14 +1676,13 @@ class TimechartApp(App):
def goto_task(self, tid: int, time: Optional[float]) -> None:
"""Select the task in the tasks or I/O view, optionally moving the cursor."""
- for tab_id, view_id, row_type in (("tasks", "#tasks_view", TaskRow),
- ("io", "#io_view", IoRow)):
+ for tab_id, view_id in (("tasks", "#tasks_view"), ("io", "#io_view")):
views = self.query(view_id)
if not views:
continue
view = views.first(TimelineView)
for idx, row in enumerate(view.rows):
- if isinstance(row, row_type) and row.task.tid == tid:
+ if isinstance(row, (TaskRow, IoRow)) and row.task.tid == tid:
self.query_one(TabbedContent).active = tab_id
if time is not None:
self.window = self.window.with_cursor(time)