Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(profiler): handle multiple processes with same name
This is similar to what Android Studio displays Say you have an app loading several images, chances are the app will create a different process to load each images but with the same name For instance, let's say this launches 5 different processes each accounting for 20% CPU usage in the same 500ms window Before this fix, the stats would be additionned, meaning we would see one single thread with that name with 100% CPU usage. It would thus hit the high CPU usage threshold, even though, nothing is actually saturating After this fix you would see process 20% process #2 20% ... process #5 20% Worth noting that a more ideal fix would have been to store processes by ids, but that actually makes the list of processes less readable and more difficult to compare Say every 500ms you load 5 requests, your 5 request processes would get recreated with same name but different ids, so every 500ms, 5 new processes would get added to the list. By still grouping by name, but allowing for multiple occurrences in a 500ms window, we keep only a smaller amount of processes, like Android Studio does for instance. It's also easier to compare and track with multiple iterations
- Loading branch information