-
Notifications
You must be signed in to change notification settings - Fork 100
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
improvement(nemesis): speed up nemesis method discovering #10551
base: master
Are you sure you want to change the base?
Conversation
Before, calling 'get_list_of_disrupt_methods' method it was spending ~170ms for each nemesis class inspection. And we have about hundred of such classes which get parsed. So, speed it up about 2.7 times by making the following changes: - Inspect source code just once for whole module - before the class processing loop. - Compile regexes before the class processing loop. As a result, it started taking ~5.8s instead of 15.5s.
Inspired by the following change: |
I think we can do even better by searching only in disrupt method |
https://github.com/scylladb/scylla-cluster-tests/pull/10502/files#diff-594b8a1eab5ee7e3ca8fa60f868a966d96d6cb570586215d03201e4ae30d8a7aR16 This is the change I did, which improved the time to miliseconds |
Nice, but how do you measure it? |
You are absolutely right, my initial measurements were for the discovery part alone (and were not precise even at that). I redid the measurements by extracting the patch into pehala@75a1736. I used Before:
After:
|
Why not do both things ? |
We can, lets see the improvement when we combine both. |
The referenced change
Deletes the code that gets updated here and implements new approach. |
you removed one call to |
The #10502 just removed the code I update here. |
Before, calling
get_list_of_disrupt_methods
method it was spending~170ms
for each nemesis class inspection.And we have about hundred of such classes which get parsed.
So, speed it up about
2.7
times by making the following changes:As a result, it started taking
~5.8s
instead of15.5s
.Testing
PR pre-checks (self review)
backport
labelsReminders
sdcm/sct_config.py
)unit-test/
folder)