Added scan to available PIDs in heartbeat - #16
Conversation
… list to backend through heartbeat call Added readme about the post profiling filtering Fix example code to run heartbeat mode profiling
| |----------|----------|----------| | ||
| | **🐍 Python eBPF** | `python_ebpf.py:355-357` | PyPerf profiles ALL Python processes system-wide, then filters results | | ||
| | **🐘 PHP** | `php.py:211-213` | phpspy profiles detected PHP processes, then filters output | | ||
| | **⚡ System/perf** | `perf.py:200,216,232` | perf runs system-wide collection, may use some targeting | |
There was a problem hiding this comment.
we improved this behavior to defer perf to start method, you probably want to rebase master and re-generate this read me ( using cursor)
| from granulate_utils.python import DETECTED_PYTHON_PROCESSES_REGEX | ||
|
|
||
| # Define profiler patterns | ||
| profiler_patterns = { |
There was a problem hiding this comment.
this will miss out process of C/C++ and Go which are triggered by perf. If you go with perf profiler pattern, it will select 1k+ process ids which is huge.
So I would suggest fetching just top 50 pids by cpu. You can rebase master and probably ask cursor : since this logic exists to fetch by top N cpu bound processes. you probably can reuse max_processes_per_profiler for this , change default to 50
There was a problem hiding this comment.
@mouralucas : happy to discuss on this requirement for C/C++, Go and NodeJs
| from granulate_utils.python import DETECTED_PYTHON_PROCESSES_REGEX | ||
|
|
||
| # Define profiler patterns | ||
| profiler_patterns = { |
There was a problem hiding this comment.
@mouralucas : happy to discuss on this requirement for C/C++, Go and NodeJs
| dest="max_processes_per_profiler", | ||
| type=positive_integer, | ||
| default=0, | ||
| default=50, |
There was a problem hiding this comment.
thanks @mouralucas for reusing this parameter
This PR aims to add a scan to find PIDs available to profile in all languages.
This found PIDs are sent to the backend through heartbeat call.
I was also added the documentation about POST PROFILE FILTERING for the available languages.
Checklist: