Slava Ovsiienko, Jun 29, 2023 at 09:16: > Hi, Robin > > Thank you for your courtesy about script reviewing. > Please see an attachment - the raw data gathered as a result of tracing, and > brief description.
Thanks for the details. I think that most of the contents of the included pdf file should go into the docs and/or into the script help. As for the script itself, the first thing to do would be to fix all warnings reported by pylint: $ pylint --enable=all mlx5_trace.py After that, I have a few general remarks: * do not use global variables except for constants * most of the time, there is no need to use sys.exit() explicitly * print errors on stderr * remember that python has exceptions, it makes error handling easier I would also advise to format your code using [black][1] so that you don't have to bother about coding style. [1]: https://github.com/psf/black Feel free to inspire from the general structure that is present in some of the scripts that I have written: * usertools/dpdk-pmdinfo.py * usertools/dpdk-rss-flows.py (not yet applied, http://patches.dpdk.org/project/dpdk/patch/20230628134748.117697-3-rja...@redhat.com/) Cheers, Robin