Skip to content

Added short summary on task_plot/*.py tools. Added encoding for *threadpool*.py genfromtxt calls

Mladen Ivkovic requested to merge task_plot_documentation_and_minor_fix into master

I noticed that there is no mention of the scripts in tools/plot_tasks, so I added a quick summary of what they do and how to generate the correct output with swift so one can use them. (I recall being confused which files I should provide the scripts the first time I was using them).

Additionally, I added the argument encoding=None to calls to genfromtxt() in the threadpool related python scripts due to the scripts crashing on my side with

  data = pl.genfromtxt(infile, dtype=None, delimiter=" ")
Traceback (most recent call last):
  File "../../../tools/task_plots/analyse_threadpool_tasks.py", line 86, in <module>
    funcs.append(i[0].replace("_mapper", ""))

TypeError: a bytes-like object is required, not 'str'

luckily a warning told me exactly how to fix this easily:

../../../tools/task_plots/analyse_threadpool_tasks.py:76: VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.

which is what I did.

@pdraper , I see your name on top of all the *.py files in that directory, so I assume that you'd be the first authority to check on my additions. That's why assigned this MR to you first. If I got the wrong person, my bad, feel free to re-assign it.

Merge request reports