-
Notifications
You must be signed in to change notification settings - Fork 31
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
Minor cleanup #373
Minor cleanup #373
Conversation
SECTION("observer obtains values in the same order twice") | ||
{ | ||
CHECK(mock.get_received_values() == std::vector{ 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6 }); | ||
CHECK(mock.get_on_completed_count() == 2); |
Check failure
Code scanning / PVS-Studio
It's odd to compare a bool type value with a value of 2.
BENCHMARK RESULTS (AUTOGENERATED)
|
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
Subscribe empty callbacks to empty observable | 845.53 ns | 1.20 ns | 0.67 ns | 1.80 |
Subscribe empty callbacks to empty observable via pipe operator | 842.80 ns | 1.20 ns | 0.67 ns | 1.80 |
Sources
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
from array of 1 - create + subscribe + immediate | 2177.88 ns | 0.80 ns | 0.37 ns | 2.16 |
from array of 1 - create + subscribe + current_thread | 3168.93 ns | 6.02 ns | 7.99 ns | 0.75 |
concat_as_source of just(1 immediate) create + subscribe | 6615.27 ns | 4.03 ns | 9.03 ns | 0.45 |
Filtering Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take(1)+subscribe | 1722.36 ns | 0.40 ns | 0.33 ns | 1.20 |
create+filter(true)+subscribe | 1029.51 ns | 0.40 ns | 0.33 ns | 1.20 |
create(1,2)+skip(1)+subscribe | 1481.36 ns | 0.40 ns | 0.33 ns | 1.20 |
create(1,1,2)+distinct_until_changed()+subscribe | 1028.51 ns | 0.40 ns | 0.33 ns | 1.20 |
Schedulers
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
immediate scheduler create worker + schedule | 875.49 ns | 0.80 ns | 0.67 ns | 1.20 |
current_thread scheduler create worker + schedule | 1063.51 ns | 7.21 ns | 5.94 ns | 1.21 |
current_thread scheduler create worker + schedule + recursive schedule | 2410.27 ns | 96.74 ns | 82.14 ns | 1.18 |
Transforming Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+map(v*2)+subscribe | 1036.69 ns | 0.40 ns | 0.33 ns | 1.20 |
create+scan(10, std::plus)+subscribe | 1218.54 ns | 0.40 ns | 0.33 ns | 1.20 |
Conditional Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take_while(false)+subscribe | 1067.57 ns | - | - | 0.00 |
create+take_while(true)+subscribe | 1028.96 ns | 0.40 ns | 0.33 ns | 1.20 |
Utility Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(1)+subscribe_on(immediate)+subscribe | 3727.44 ns | 0.40 ns | 0.33 ns | 1.20 |
Combining Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(create(1), create(1)) + merge() + subscribe | 5284.64 ns | 258.19 ns | 213.06 ns | 1.21 |
create(1) + merge_with(create(2)) + subscribe | 8235.81 ns | 259.71 ns | 214.73 ns | 1.21 |
ci-macos
General
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
Subscribe empty callbacks to empty observable | 1121.70 ns | 0.56 ns | 0.56 ns | 0.99 |
Subscribe empty callbacks to empty observable via pipe operator | 1118.19 ns | 0.56 ns | 0.56 ns | 0.99 |
Sources
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
from array of 1 - create + subscribe + immediate | 2448.91 ns | 0.44 ns | 0.49 ns | 0.89 |
from array of 1 - create + subscribe + current_thread | 2986.70 ns | 8.07 ns | 12.10 ns | 0.67 |
concat_as_source of just(1 immediate) create + subscribe | 6803.75 ns | 6.69 ns | 12.65 ns | 0.53 |
Filtering Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take(1)+subscribe | 2163.11 ns | 0.28 ns | 0.28 ns | 1.00 |
create+filter(true)+subscribe | 1207.42 ns | 0.30 ns | 0.28 ns | 1.05 |
create(1,2)+skip(1)+subscribe | 2000.28 ns | 0.29 ns | 0.28 ns | 1.06 |
create(1,1,2)+distinct_until_changed()+subscribe | 1268.88 ns | 0.59 ns | 0.56 ns | 1.05 |
Schedulers
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
immediate scheduler create worker + schedule | 1135.76 ns | 0.56 ns | 0.56 ns | 1.01 |
current_thread scheduler create worker + schedule | 1350.04 ns | 8.92 ns | 8.40 ns | 1.06 |
current_thread scheduler create worker + schedule + recursive schedule | 2457.54 ns | 156.01 ns | 152.94 ns | 1.02 |
Transforming Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+map(v*2)+subscribe | 1150.45 ns | 0.28 ns | 0.28 ns | 1.00 |
create+scan(10, std::plus)+subscribe | 1399.95 ns | 0.56 ns | 0.56 ns | 1.01 |
Conditional Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take_while(false)+subscribe | 1191.64 ns | - | - | 0.00 |
create+take_while(true)+subscribe | 1151.73 ns | 0.28 ns | 0.28 ns | 0.99 |
Utility Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(1)+subscribe_on(immediate)+subscribe | 3967.46 ns | 0.30 ns | 0.28 ns | 1.07 |
Combining Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(create(1), create(1)) + merge() + subscribe | 4174.91 ns | 400.34 ns | 367.98 ns | 1.09 |
create(1) + merge_with(create(2)) + subscribe | 6953.82 ns | 370.97 ns | 369.02 ns | 1.01 |
ci-ubuntu-clang
General
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
Subscribe empty callbacks to empty observable | 414.56 ns | 0.79 ns | 0.60 ns | 1.32 |
Subscribe empty callbacks to empty observable via pipe operator | 411.39 ns | 0.78 ns | 0.80 ns | 0.98 |
Sources
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
from array of 1 - create + subscribe + immediate | 876.93 ns | 0.40 ns | 0.41 ns | 0.98 |
from array of 1 - create + subscribe + current_thread | 1196.83 ns | 5.15 ns | 5.69 ns | 0.91 |
concat_as_source of just(1 immediate) create + subscribe | 2778.90 ns | 8.22 ns | 7.02 ns | 1.17 |
Filtering Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take(1)+subscribe | 817.35 ns | 0.41 ns | 0.40 ns | 1.02 |
create+filter(true)+subscribe | 458.82 ns | 0.41 ns | 0.40 ns | 1.02 |
create(1,2)+skip(1)+subscribe | 675.18 ns | 0.42 ns | 0.40 ns | 1.04 |
create(1,1,2)+distinct_until_changed()+subscribe | 452.87 ns | 0.82 ns | 0.80 ns | 1.03 |
Schedulers
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
immediate scheduler create worker + schedule | 371.33 ns | 0.82 ns | 0.80 ns | 1.02 |
current_thread scheduler create worker + schedule | 470.81 ns | 5.31 ns | 4.03 ns | 1.32 |
current_thread scheduler create worker + schedule + recursive schedule | 974.97 ns | 80.69 ns | 64.56 ns | 1.25 |
Transforming Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+map(v*2)+subscribe | 521.29 ns | 0.51 ns | 0.40 ns | 1.28 |
create+scan(10, std::plus)+subscribe | 527.85 ns | 0.82 ns | 0.40 ns | 2.06 |
Conditional Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take_while(false)+subscribe | 512.20 ns | - | - | 0.00 |
create+take_while(true)+subscribe | 574.21 ns | 0.41 ns | 0.40 ns | 1.03 |
Utility Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(1)+subscribe_on(immediate)+subscribe | 2122.61 ns | 0.40 ns | 0.40 ns | 0.99 |
Combining Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(create(1), create(1)) + merge() + subscribe | 2666.04 ns | 148.82 ns | 108.70 ns | 1.37 |
create(1) + merge_with(create(2)) + subscribe | 4267.68 ns | 146.19 ns | 104.54 ns | 1.40 |
ci-windows
General
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
Subscribe empty callbacks to empty observable | 1765.56 ns | 2.07 ns | 2.41 ns | 0.86 |
Subscribe empty callbacks to empty observable via pipe operator | 2249.67 ns | 1.96 ns | 2.41 ns | 0.82 |
Sources
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
from array of 1 - create + subscribe + immediate | 2809.88 ns | 8.15 ns | 10.43 ns | 0.78 |
from array of 1 - create + subscribe + current_thread | 3503.45 ns | 23.55 ns | 30.05 ns | 0.78 |
concat_as_source of just(1 immediate) create + subscribe | 13461.63 ns | 21.13 ns | 34.58 ns | 0.61 |
Filtering Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take(1)+subscribe | 2653.00 ns | 8.27 ns | 9.20 ns | 0.90 |
create+filter(true)+subscribe | 1425.21 ns | 5.64 ns | 6.43 ns | 0.88 |
create(1,2)+skip(1)+subscribe | 2152.94 ns | 10.52 ns | 9.65 ns | 1.09 |
create(1,1,2)+distinct_until_changed()+subscribe | 1545.80 ns | 16.17 ns | 17.64 ns | 0.92 |
Schedulers
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
immediate scheduler create worker + schedule | 1867.45 ns | 5.39 ns | 5.22 ns | 1.03 |
current_thread scheduler create worker + schedule | 2127.13 ns | 12.47 ns | 13.66 ns | 0.91 |
current_thread scheduler create worker + schedule + recursive schedule | 3089.83 ns | 156.44 ns | 165.45 ns | 0.95 |
Transforming Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+map(v*2)+subscribe | 1441.58 ns | 6.50 ns | 7.23 ns | 0.90 |
create+scan(10, std::plus)+subscribe | 1716.70 ns | 9.55 ns | 10.32 ns | 0.93 |
Conditional Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create+take_while(false)+subscribe | 1551.94 ns | 5.14 ns | 5.21 ns | 0.99 |
create+take_while(true)+subscribe | 1420.20 ns | 6.29 ns | 7.26 ns | 0.87 |
Utility Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(1)+subscribe_on(immediate)+subscribe | 5089.71 ns | 11.38 ns | 13.99 ns | 0.81 |
Combining Operators
name | rxcpp | rpp | prev rpp | ratio |
---|---|---|---|---|
create(create(1), create(1)) + merge() + subscribe | 5686.01 ns | 1030.07 ns | 448.71 ns | 2.30 |
create(1) + merge_with(create(2)) + subscribe | 9005.65 ns | 381.49 ns | 444.12 ns | 0.86 |
Codecov Report
@@ Coverage Diff @@
## v2 #373 +/- ##
==========================================
- Coverage 99.15% 99.12% -0.04%
==========================================
Files 37 37
Lines 832 802 -30
==========================================
- Hits 825 795 -30
Misses 7 7
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Kudos, SonarCloud Quality Gate passed! |
No description provided.