----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60060/ -----------------------------------------------------------
Review request for Aurora, David McLaughlin and Santhosh Kumar Shanmugham. Repository: aurora Description ------- # Introduce `ProcessTreeCache` to stores and updates a copy of `pstree` My measurements shows that on a busy machine, a single call to `psutil.Process.children` can take up to 20 seconds. Looking at what the library does (Process.children)[https://pythonhosted.org/psutil/_modules/psutil.html#Process.children] I see that it computes a mapping from each parent to its immidiate children and does a BFS on it. This repeated process (calculating the table) takes up a lot of time and can be dones on a slightly obsolete version of pstree. Diffs ----- src/main/python/apache/thermos/monitoring/process_collector_psutil.py 3594955c68b45ab65c01426ba0a18ec8a132a27f src/test/python/apache/thermos/monitoring/test_process_collector_psutil.py 93ff878be578fa7a63d25b65e7d915790dc9ccc6 Diff: https://reviews.apache.org/r/60060/diff/1/ Testing ------- current test pass. I added a few unit tests but also more be added. Thanks, Reza Motamedi