Re-introduced TQDM for message tree loop
This commit is contained in:
parent
98cd6fc3db
commit
062fcbe25a
1 changed files with 5 additions and 10 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_worker0/aw_replay/tracing/scenario-trace/ust\"\n",
|
||||
"TR_PATH = \"data/trace-awsim-x86/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",
|
||||
|
@ -107,10 +107,10 @@
|
|||
"# Whether to compute E2E latencies.\n",
|
||||
"E2E_ENABLED = True\n",
|
||||
"# Whether to plot end-to-end latency information (ignored if E2E_ENABLED is False)\n",
|
||||
"E2E_PLOT = False\n",
|
||||
"E2E_PLOT = True\n",
|
||||
"# The index of the output message that shall be used in plots that visualize a specific\n",
|
||||
"# message dependency tree. This index has to be 0 <= n < #output messages\n",
|
||||
"E2E_PLOT_TIMESTAMP = 200\n",
|
||||
"E2E_PLOT_TIMESTAMP = 1000\n",
|
||||
"# E2E latency threshold. Every E2E latency higher than this is discarded.\n",
|
||||
"# Set this as low as comfortably possible to speed up calculations.\n",
|
||||
"# WARNING: If you set this too low (i.e. to E2E latencies that plausibly can happen)\n",
|
||||
|
@ -687,7 +687,6 @@
|
|||
"\n",
|
||||
"end_topics = [t for t in _tracing_context.topics if any(re.search(f, t.name) for f in E2E_OUTPUT_TOPIC_PATTERNS)]\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def build_dep_trees():\n",
|
||||
" all_trees = []\n",
|
||||
" for end_topic in end_topics:\n",
|
||||
|
@ -695,18 +694,14 @@
|
|||
" print(f\"====={end_topic.name}\")\n",
|
||||
"\n",
|
||||
" pubs = end_topic.publishers\n",
|
||||
" print(len(pubs))\n",
|
||||
" for pub in pubs:\n",
|
||||
" msgs = list(pub.instances)\n",
|
||||
" print(\"\\n\".join(map(str, msgs)))\n",
|
||||
" for msg in msgs:\n",
|
||||
" for msg in tqdm(msgs, desc=\"Processing output messages\"):\n",
|
||||
" msg: TrPublishInstance\n",
|
||||
" tree = get_dep_tree(msg)\n",
|
||||
" all_trees.append(tree)\n",
|
||||
" print()\n",
|
||||
" return all_trees\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"try:\n",
|
||||
" trees = cached(\"trees\", build_dep_trees, [TR_PATH], not CACHING_ENABLED)\n",
|
||||
"except Exception as e:\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue