-
Notifications
You must be signed in to change notification settings - Fork 10
add unit benchmark for remote channel #315
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #315 +/- ##
==========================================
+ Coverage 26.62% 27.23% +0.61%
==========================================
Files 188 190 +2
Lines 39015 39530 +515
Branches 14155 14428 +273
==========================================
+ Hits 10388 10767 +379
- Misses 27222 27882 +660
+ Partials 1405 881 -524 ☔ View full report in Codecov by Sentry. |
int num_channels{100}; | ||
}; | ||
|
||
BENCHMARK_F(RemoteChannelFixture, BenchSupportsChannel)(benchmark::State& state) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we planning to run this as a part of Q/A test suite?
uint64_t best_time = 0; | ||
Realm::XferDesKind best_kind = Realm::XferDesKind::XFER_NONE; | ||
for (int i = 0; i < num_channels; i++) { | ||
best_time = channels[i]->supports_path(channel_copy_infos[i], 0, 0, 0, 10000, nullptr, nullptr, &best_kind, nullptr, nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please document all hard-coded values that you are passing.
This PR adds a unit benchmark using google benchmark for the
supports_path
of the remote channel. We can kind of use it to reproduce the realm regression we had before. Here is some performance data on my workstation with release build:Without the fix:
With the fix: