better naming for start/end topic filters

This commit is contained in:
Maximilian Schmeller 2022-09-09 13:55:54 +02:00
parent 0c05267bb0
commit ebbfef7ecf

View file

@ -386,7 +386,9 @@
"from tqdm.notebook import tqdm\n", "from tqdm.notebook import tqdm\n",
"from bisect import bisect\n", "from bisect import bisect\n",
"\n", "\n",
"topic_name_filter = [\"/control/trajectory_follower/control_cmd\"]\n", "# All topics containing any of these strings are considered end topics in E2E latency calculations\n",
"# E.g. /control/ will cover all control topics\n",
"end_topic_filters = [\"/control/trajectory_follower/control_cmd\"]\n",
"\n", "\n",
"\n", "\n",
"def inst_get_dep_msg(inst: TrCallbackInstance):\n", "def inst_get_dep_msg(inst: TrCallbackInstance):\n",
@ -546,7 +548,7 @@
"\n", "\n",
"#for path in e2e_topic_paths:\n", "#for path in e2e_topic_paths:\n",
"# end_topics = path[-1]\n", "# end_topics = path[-1]\n",
"end_topics = [t for t in _tracing_context.topics if any(f in t.name for f in topic_name_filter)]\n", "end_topics = [t for t in _tracing_context.topics if any(f in t.name for f in end_topic_filters)]\n",
"for end_topic in end_topics:\n", "for end_topic in end_topics:\n",
" end_topic: TrTopic\n", " end_topic: TrTopic\n",
"\n", "\n",
@ -661,6 +663,8 @@
"from typing import List\n", "from typing import List\n",
"from latency_graph.message_tree import DepTree\n", "from latency_graph.message_tree import DepTree\n",
"\n", "\n",
"# All topics containing any of these strings are considered start topics in E2E latency calculations\n",
"# E.g. /sensing/ will cover all sensing topics\n",
"start_topic_filters = [\"/vehicle/status/\", \"/sensing/imu\"]\n", "start_topic_filters = [\"/vehicle/status/\", \"/sensing/imu\"]\n",
"\n", "\n",
"def leaf_topics(tree: DepTree, lvl=0):\n", "def leaf_topics(tree: DepTree, lvl=0):\n",