Fix outputs, fix AST crash
This commit is contained in:
parent
68e9e6a9a5
commit
7d54f07214
2 changed files with 33 additions and 20 deletions
|
@ -61,7 +61,7 @@
|
|||
"# Path to trace directory (e.g. ~/.ros/my-trace/ust) or to a converted trace file.\n",
|
||||
"# Using the path \"/ust\" at the end is optional but greatly reduces processing time\n",
|
||||
"# if kernel traces are also present.\n",
|
||||
"TR_PATH = \"/home/max/Projects/optimization_framework/artifacts/iteration0_worker1/aw_replay/tracing/scenario-trace/ust\"\n",
|
||||
"TR_PATH = \"/home/max/Projects/optimization_framework/artifacts/iteration0_worker0/aw_replay/tracing/scenario-trace/ust\"\n",
|
||||
"\n",
|
||||
"# Path to the folder all artifacts from this notebook are saved to.\n",
|
||||
"# This entails plots as well as data tables.\n",
|
||||
|
@ -119,10 +119,10 @@
|
|||
"\n",
|
||||
"# All topics containing any of these RegEx patterns are considered output topics in E2E latency calculations\n",
|
||||
"# E.g. r\"^/control/\" will cover all control topics\n",
|
||||
"E2E_OUTPUT_TOPIC_PATTERNS = [r\"^/control/\", r\"^/vehicle\"]\n",
|
||||
"E2E_OUTPUT_TOPIC_PATTERNS = [r\"^/control/.*?/control_cmd\"]\n",
|
||||
"# All topics containing any of these RegEx patterns are considered input topics in E2E latency calculations\n",
|
||||
"# E.g. r\"^/sensing/\" will cover all sensing topics\n",
|
||||
"E2E_INPUT_TOPIC_PATTERNS = [r\"^/vehicle/status/\", r\"^/sensing/imu\"]\n",
|
||||
"E2E_INPUT_TOPIC_PATTERNS = [r\"^/vehicle/status/\", r\"^/sensing/\"]\n",
|
||||
"\n",
|
||||
"# This code overrides the above constants with environment variables, do not edit.\n",
|
||||
"for env_key, env_value in os.environ.items():\n",
|
||||
|
@ -223,7 +223,7 @@
|
|||
"execution_count": null,
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for topic in topics:\n",
|
||||
"for topic in sorted(topics, key=lambda t: t.name):\n",
|
||||
" topic: TrTopic\n",
|
||||
" print(f\"{topic.name:.<120s} | {sum(map(lambda p: len(p.instances), topic.publishers))}\")"
|
||||
],
|
||||
|
@ -294,7 +294,7 @@
|
|||
"node_namespace_mapping = {\n",
|
||||
" 'perception': 'perception',\n",
|
||||
" 'sensing': 'sensing',\n",
|
||||
" 'planning': 'planning',\n",
|
||||
" 'plannitokenizeng': 'planning',\n",
|
||||
" 'control': 'control',\n",
|
||||
" 'awapi': None,\n",
|
||||
" 'autoware_api': None,\n",
|
||||
|
@ -1380,7 +1380,10 @@
|
|||
"\n",
|
||||
"out_df = pd.DataFrame(columns=[\"path\", \"timestamp\", \"e2e_latency\"])\n",
|
||||
"for key, paths in items:\n",
|
||||
" path_records = [(\" -> \".join(key), p[0].timestamp, p[0].timestamp - p[-1].timestamp) for p in paths]\n",
|
||||
" path_records = [{\"path\": \" -> \".join(key),\n",
|
||||
" \"timestamp\": p[0].timestamp,\n",
|
||||
" \"e2e_latency\": p[0].timestamp - p[-1].timestamp}\n",
|
||||
" for p in paths]\n",
|
||||
" out_df.append(path_records)\n",
|
||||
" print(\n",
|
||||
" f\"======== {len(paths)}x: {sum(map(lambda p: p[0].timestamp - p[-1].timestamp, paths)) / len(paths) * 1000:.3f}ms\")\n",
|
||||
|
@ -1464,4 +1467,4 @@
|
|||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue