Repository navigation
#12440 Add benchmark for LogPublisher - #12445
Conversation
CodSpeed Performance ReportMerging #12445 will degrade performances by 3.25%Comparing Summary
Benchmarks breakdown
|
|
please review |
|
Static checks are failing, can you get required statuses to pass before submitting please? |
|
Thanks for the tests. I created a newsfragment as a placeholder to support the PR #12440 and make the test file a .py file so that it will be executed by our test infra it looks like the benchmark test environment is kind of flaky today... I triggered a re-run for the benchmark tests |
Get the test triggered
| self.last_event = event | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("num_observers", [100, 500, 1000]) |
There was a problem hiding this comment.
Just asking. Is there a any benefit in running with differet sizes ?
I guess that we only want to run the benchmark for as large of a set as possible
this should reduce run variations / flaky tests
There was a problem hiding this comment.
Makes sense, I updated the code.
adiroiban
left a comment
There was a problem hiding this comment.
Many thanks for the PR.
I don't have much experience with writing benchmark tests...but I think that this is a start
The failure for test_deferred_await is not related to this PR
I left a few comments.
I think that we can merge this, and if needed we can make more changes as part of #12440
Thanks again
Co-authored-by: Adi Roiban <[email protected]>
twm
left a comment
There was a problem hiding this comment.
This looks reasonable to me. Thank you for the contribution, and I look forward to the next one!
| @@ -0,0 +1 @@ | |||
| Add benchmark test to support future PR. | |||
There was a problem hiding this comment.
If this weren't a .misc it should mention that it's a benchmark of LogPublisher. I think .misc is fine in this case, though.
Scope and purpose
This benchmark measures the performance of the
LogPublisherwhen dispatching events to multiple observers and when adding/removing observers. It evaluates the cost of maintaining an ordered set of unique observers under different loads.This benchmark was added as part of the work in PR #12440.