Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
754 stars 54 forks source link

python: Collected python version in bad format #754

Open Jongy opened 1 year ago

Jongy commented 1 year ago

We run python -V and get a result like 'Python 3.7.0 (default, Sep 10 2019, 18:15:34) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]\n' which is unexpected - we try to keep the format Python x.y.z. (this build is Python 3.7.0 on CentOS 7).

I suppose we could catch this case and strip away the other parts, so we remain with Python 3.7.0. Be very defensive to avoid incorrectly parsing versions.

pfilipko1 commented 1 year ago

This extended output is usually produced by something like

 python3 -V -V

or

python3 --version --version

or a combination of those, which would indicate that the version argument flag is being passed twice somehow.