From acfdb08d1217062ca1b4fccfeb85d7aa21f03d35 Mon Sep 17 00:00:00 2001 From: Maximilian Schmeller Date: Mon, 19 Sep 2022 16:53:26 +0200 Subject: [PATCH] Respect input topic filters again --- trace-analysis.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trace-analysis.ipynb b/trace-analysis.ipynb index 97f3267..f5169c8 100644 --- a/trace-analysis.ipynb +++ b/trace-analysis.ipynb @@ -845,7 +845,7 @@ "e2ess = []\n", "e2e_pathss = []\n", "for tree in trees:\n", - " e2es, e2e_paths = zip(*relevant_e2es(tree, [\"\"]))\n", + " e2es, e2e_paths = zip(*relevant_e2es(tree, E2E_INPUT_TOPIC_PATTERNS))\n", " e2ess.append(e2es)\n", " e2e_pathss.append(e2e_paths)" ], @@ -1014,7 +1014,7 @@ "\n", " match inst:\n", " case TrPublishInstance(publisher=pub):\n", - " return pub and any(f in pub.topic_name for f in E2E_INPUT_TOPIC_PATTERNS)\n", + " return pub and any(re.search(f, pub.topic_name) for f in E2E_INPUT_TOPIC_PATTERNS)\n", " return False\n", "\n", "\n", @@ -1171,7 +1171,7 @@ "%%skip_if_false E2E_ENABLED\n", "%%skip_if_false E2E_PLOT\n", "\n", - "tree = trees[E2E_PLOT_TIMESTAMP]\n", + "tree = relevant_trees[E2E_PLOT_TIMESTAMP]\n", "e2es = e2ess[E2E_PLOT_TIMESTAMP]\n", "e2e_paths = e2e_pathss[E2E_PLOT_TIMESTAMP]\n", "margin_y = .2\n", @@ -1335,7 +1335,7 @@ "plot_margin_x = .01 * tree_e2e\n", "ax.set_xlim(-tree_e2e - plot_margin_x, plot_margin_x)\n", "ax.set_yticks(np.array(range(len(y_labels))) + .5, y_labels)\n", - "ax.set_title(f\"Timestep {E2E_PLOT_TIMESTAMP}: {(tree.head.timestamp - trees[0].head.timestamp):10.6f}s\")\n", + "ax.set_title(f\"Timestep {E2E_PLOT_TIMESTAMP}: {(tree.head.timestamp - relevant_trees[0].head.timestamp):10.6f}s\")\n", "ax.set_xlabel(\"Time relative to output message [s]\")\n", "ax.set_ylabel(\"Start topic\")\n", "\n", @@ -1375,7 +1375,7 @@ "\n", "critical_paths = {}\n", "print(len(relevant_trees))\n", - "for tree in tqdm(trees):\n", + "for tree in tqdm(relevant_trees):\n", " crit = critical_path(tree)\n", "\n", "\n", @@ -1481,4 +1481,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file