-
Notifications
You must be signed in to change notification settings - Fork 11
Added golang and node process utils #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
put these in a their own module, don't throw it in the package root |
Python and Java are also in the root folder. |
granulate_utils/node.py
Outdated
| # Licensed under the AGPL3 License. See LICENSE.md in the project root for license information. | ||
| # | ||
|
|
||
| DETECTED_NODE_PROCESSES_REGEX = r"^.+/libnode\.so" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such thing as libnode. Node process identification is done by /proc/pid/exe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently it's only loaded on some versions. Changed to gProfiler's method, so now all logic is copied.
|
See that the runtime detection code in gProfiler has gone through some changes here : |
granulate_utils/golang.py
Outdated
|
|
||
| @functools.lru_cache(maxsize=4096) | ||
| def get_process_golang_version(process: Process) -> Optional[str]: | ||
| elf_path = f"/proc/{process.pid}/exe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use granulate_utils.linux.process.process_exe
This PR updates granulate-utils post the changes in intel/granulate-utils#73, and includes a few other updates from the utils repo as well, one of them is intel/granulate-utils#87 which fixes #503.
Most of the code is copied from:
https://github.com/Granulate/gprofiler/blob/master/gprofiler/profilers/perf.py#L272
And will be used there as well.