Skip to content
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

Fix race condition #257

Merged
merged 5 commits into from
Sep 6, 2022
Merged

Fix race condition #257

merged 5 commits into from
Sep 6, 2022

Conversation

victimsnino
Copy link
Owner

No description provided.

@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #257 (bdc77c4) into main (6f40411) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #257   +/-   ##
=======================================
  Coverage   98.42%   98.43%           
=======================================
  Files          92       92           
  Lines        1337     1338    +1     
=======================================
+ Hits         1316     1317    +1     
  Misses         21       21           
Impacted Files Coverage Δ
src/rpp/rpp/operators/combine_latest.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/operators/concat.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/operators/merge.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/operators/switch_on_next.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/operators/with_latest_from.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/operators/fwd/merge.hpp 100.00% <0.00%> (ø)
src/rpp/rpp/operators/fwd/start_with.hpp 100.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-clang

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.37ns 0.335381 1.11 0.40ns
Dynamic observable construction 30.19ns 29.2068 1.03 29.78ns
Specific observable construction + as_dynamic 33.76ns 29.1453 1.16 29.49ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 131.50ns 111.049 1.18 342.57ns
Specific observable lift dynamic observer 161.71ns 134.465 1.20 335.23ns
Dynamic observable lift specific observer 221.18ns 182.885 1.21 345.46ns
Dynamic observable lift dynamic observer 231.84ns 190.759 1.22 363.26ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 80.75ns 77.3485 1.04 324.72ns
Specific observable subscribe dynamic observer 107.41ns 90.7825 1.18 359.01ns
Dynamic observable subscribe specific observer 166.52ns 145.409 1.15 404.43ns
Dynamic observable subscribe dynamic observer 170.99ns 139.806 1.22 352.20ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 75.08ns 75.6041 0.99 336.79ns
Dynamic observable subscribe lambda 158.82ns 142.271 1.12 378.91ns
Specific observable subscribe lambda without subscription 86.90ns 75.7286 1.15 348.24ns
Dynamic observable subscribe lambda without subscription 161.36ns 139.806 1.15 367.91ns
Specific observable subscribe specific subscriber 49.64ns 43.1894 1.15 260.61ns
Dynamic observable subscribe specific subscriber 116.54ns 107.617 1.08 317.99ns
Specific observable subscribe dynamic observer 53.31ns 43.5082 1.23 264.97ns
Dynamic observable subscribe dynamic observer 97.70ns 94.0413 1.04 304.07ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.40ns 0.335213 1.18 0.40ns
Dynamic observer construction 35.06ns 29.1735 1.20 26.10ns
Specific observer construction + as_dynamic 35.11ns 29.265 1.20 24.88ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.71ns 0.669047 1.06 0.79ns
Dynamic observer OnNext 1.98ns 1.67687 1.18 2.63ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 38.99ns 32.6174 1.20 76.21ns
Make copy of subscriber 18.16ns 17.0862 1.06 5.55ns
Transform subsriber to dynamic 47.63ns 43.7489 1.09 31.58ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 38.30ns 32.7326 1.17 61.58ns
composite_subscription add 58.67ns 49.086 1.20 93.51ns
composite_subscription unsubscribe 53.51ns 43.9783 1.22 26.86ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 311.55ns 266.939 1.17 2198.69ns
sending of values from observable via buffer to subscriber 7.88ns 6.4952 1.21 32.83ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 322.30ns 269.415 1.20 604.32ns
long stateful chain creation + subscribe 484.08ns 401.27 1.21 920.21ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 735.17ns 613.853 1.20 1019.83ns
sending of values from observable via combine_latest to subscriber 21.03ns 18.0943 1.16 2.80ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1562.30ns 1391.58 1.12 3600.80ns
concat_with 1989.54ns 1651.96 1.20 4057.58ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 143.07ns 127.606 1.12 294.45ns
sending of values from observable via distinct_until_changed to subscriber 2.85ns 2.34629 1.21 2.41ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 170.71ns 142.889 1.19 697.92ns
sending of values from observable via first to subscriber 0.78ns 0.670216 1.16 0.81ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 104.95ns 85.978 1.22 745.51ns
error 165.40ns 134.422 1.23 807.67ns
never 51.93ns 46.8668 1.11 272.23ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 113.91ns 98.6708 1.15 770.79ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 0.80ns 0.670597 1.20 135.05ns
re-schedule 10 times 11.35ns 9.38805 1.21 172.44ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 101.16ns 85.3607 1.19 771.47ns
just send variadic 140.95ns 117.017 1.20 901.71ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 105.62ns 92.0395 1.15 268.61ns
sending of values from observable via map to subscriber 1.16ns 1.00648 1.15 1.79ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1597.49ns 1352.45 1.18 3653.89ns
merge_with 1885.14ns 1610.54 1.17 3669.77ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 673.62ns 577.135 1.17 2764.55ns
sending of values from observable via observe_on to subscriber 101.99ns 89.8151 1.14 213.50ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 27.36ns 24.1111 1.13 12.27ns
on_error 0.61ns 0.505611 1.20 20.41ns
on_completed 0.60ns 0.505552 1.19 0.78ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 234.44ns 197.181 1.19 212.93ns
get_observable 34.90ns 29.0624 1.20 54.02ns
get_subscriber 72.66ns 60.5742 1.20 17.02ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4589.84ns 3972.91 1.16 3169.48ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 134.52ns 126.676 1.06 356.15ns
sending of values from observable via scan to subscriber 2.41ns 2.01061 1.20 2.41ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 142.98ns 120.269 1.19 456.60ns
sending of values from observable via skip to subscriber 2.03ns 1.68449 1.20 2.17ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2276.38ns 1843.03 1.24 3327.76ns
sending of values from observable via switch_on_next to subscriber 637.16ns 518.271 1.23 766.58ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 222.81ns 185.727 1.20 579.62ns
sending of values from observable via take to subscriber 2.81ns 2.34778 1.20 4.03ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 237.21ns 226.1 1.05 633.92ns
sending of values from observable via take_last to subscriber 4.00ns 3.70358 1.08 4.93ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 13.55ns 11.7393 1.15 175.51ns
re-schedule 10 times 35.51ns 30.4711 1.17 209.15ns
recursively schedule 10 times 1652.18ns 1445.25 1.14 6277.29ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2454.58ns 2053.22 1.20 3602.07ns
sending of values from observable via window to subscriber 659.18ns 550.714 1.20 429.68ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 728.81ns 631.393 1.15 1330.64ns
sending of values from observable via with_latest_from to subscriber 38.82ns 17.7474 2.19 3.29ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.33ns 0.368164 0.91 0.33ns
Dynamic observable construction 31.48ns 31.4909 1.00 23.34ns
Specific observable construction + as_dynamic 31.47ns 31.4072 1.00 23.28ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 119.16ns 118.95 1.00 333.28ns
Specific observable lift dynamic observer 144.66ns 144.609 1.00 344.33ns
Dynamic observable lift specific observer 199.45ns 198.976 1.00 382.87ns
Dynamic observable lift dynamic observer 207.41ns 207.475 1.00 363.06ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 83.59ns 83.5569 1.00 328.14ns
Specific observable subscribe dynamic observer 95.44ns 95.3762 1.00 329.54ns
Dynamic observable subscribe specific observer 149.19ns 150.158 0.99 365.58ns
Dynamic observable subscribe dynamic observer 146.13ns 145.86 1.00 341.27ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 83.15ns 82.8395 1.00 326.52ns
Dynamic observable subscribe lambda 150.77ns 151.662 0.99 364.63ns
Specific observable subscribe lambda without subscription 82.89ns 82.7392 1.00 326.78ns
Dynamic observable subscribe lambda without subscription 151.55ns 151.398 1.00 384.85ns
Specific observable subscribe specific subscriber 50.30ns 50.1459 1.00 271.63ns
Dynamic observable subscribe specific subscriber 121.66ns 118.14 1.03 310.65ns
Specific observable subscribe dynamic observer 49.96ns 49.9132 1.00 279.21ns
Dynamic observable subscribe dynamic observer 102.87ns 102.579 1.00 288.66ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.34ns 0.334762 1.00 0.33ns
Dynamic observer construction 31.54ns 31.5845 1.00 21.69ns
Specific observer construction + as_dynamic 31.46ns 31.5945 1.00 20.00ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.34ns 0.335262 1.00 0.33ns
Dynamic observer OnNext 1.68ns 2.00855 0.83 2.01ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 34.54ns 34.8143 0.99 58.97ns
Make copy of subscriber 16.73ns 16.7326 1.00 4.49ns
Transform subsriber to dynamic 44.34ns 44.5323 1.00 26.73ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 34.81ns 34.8162 1.00 54.51ns
composite_subscription add 47.33ns 46.5114 1.02 101.54ns
composite_subscription unsubscribe 41.63ns 42.002 0.99 22.17ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 256.07ns 254.788 1.01 1889.79ns
sending of values from observable via buffer to subscriber 7.39ns 6.72464 1.10 31.10ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 298.67ns 299.616 1.00 703.89ns
long stateful chain creation + subscribe 435.78ns 435.565 1.00 1053.46ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 640.23ns 651.389 0.98 1095.02ns
sending of values from observable via combine_latest to subscriber 18.43ns 18.4042 1.00 2.34ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1463.67ns 1433.59 1.02 3616.40ns
concat_with 1749.43ns 1729.97 1.01 3897.20ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 135.29ns 137.538 0.98 353.60ns
sending of values from observable via distinct_until_changed to subscriber 3.35ns 3.34926 1.00 1.34ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 158.57ns 158.803 1.00 694.55ns
sending of values from observable via first to subscriber 1.34ns 0.671709 2.00 1.01ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 86.90ns 87.4385 0.99 743.71ns
error 131.33ns 133.902 0.98 838.35ns
never 49.53ns 49.3438 1.00 283.22ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 106.79ns 105.468 1.01 777.32ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.67ns 1.67765 1.00 134.01ns
re-schedule 10 times 23.05ns 22.7713 1.01 159.21ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 89.55ns 90.6606 0.99 770.73ns
just send variadic 135.02ns 135.111 1.00 831.90ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 101.12ns 106.637 0.95 341.00ns
sending of values from observable via map to subscriber 1.34ns 0.842773 1.59 2.35ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1373.01ns 1381.37 0.99 3770.32ns
merge_with 1677.02ns 1673.51 1.00 4044.20ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 604.85ns 610.529 0.99 2804.42ns
sending of values from observable via observe_on to subscriber 87.70ns 87.9416 1.00 236.11ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 22.42ns 22.8149 0.98 9.95ns
on_error 0.67ns 0.674769 1.00 16.82ns
on_completed 0.67ns 0.674392 1.00 1.01ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 213.84ns 210.781 1.01 173.59ns
get_observable 29.44ns 29.4189 1.00 47.76ns
get_subscriber 57.30ns 65.3336 0.88 23.02ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4097.70ns 4111.05 1.00 3165.76ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 136.97ns 147.539 0.93 390.05ns
sending of values from observable via scan to subscriber 3.01ns 3.35225 0.90 2.34ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 133.96ns 134.402 1.00 525.66ns
sending of values from observable via skip to subscriber 3.35ns 3.01475 1.11 2.35ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 1980.71ns 1937.02 1.02 4229.51ns
sending of values from observable via switch_on_next to subscriber 552.96ns 535.22 1.03 1064.65ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 190.13ns 189.273 1.00 584.44ns
sending of values from observable via take to subscriber 4.20ns 4.03899 1.04 3.80ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 230.12ns 230.386 1.00 629.30ns
sending of values from observable via take_last to subscriber 3.38ns 3.39054 1.00 5.90ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 20.58ns 22.047 0.93 181.91ns
re-schedule 10 times 49.95ns 49.9625 1.00 217.81ns
recursively schedule 10 times 1442.74ns 1405.66 1.03 6287.72ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2152.75ns 2151.1 1.00 3269.66ns
sending of values from observable via window to subscriber 586.76ns 585.988 1.00 417.42ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 687.14ns 671.914 1.02 1350.97ns
sending of values from observable via with_latest_from to subscriber 35.15ns 18.0702 1.95 4.21ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 1.91ns 1.50662 1.27 0.80ns
Dynamic observable construction 108.28ns 84.9866 1.27 145.90ns
Specific observable construction + as_dynamic 94.21ns 85.2767 1.10 146.70ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 203.18ns 173.338 1.17 1407.28ns
Specific observable lift dynamic observer 229.29ns 234.317 0.98 2274.71ns
Dynamic observable lift specific observer 342.88ns 305.726 1.12 2137.88ns
Dynamic observable lift dynamic observer 308.42ns 260.68 1.18 1444.94ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 160.60ns 140.385 1.14 1568.50ns
Specific observable subscribe dynamic observer 173.20ns 155.311 1.12 5688.22ns
Dynamic observable subscribe specific observer 297.04ns 260.303 1.14 1583.50ns
Dynamic observable subscribe dynamic observer 216.67ns 202.384 1.07 1669.88ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 164.55ns 138.634 1.19 1440.67ns
Dynamic observable subscribe lambda 292.28ns 259.48 1.13 1472.72ns
Specific observable subscribe lambda without subscription 162.12ns 139.087 1.17 1409.48ns
Dynamic observable subscribe lambda without subscription 300.54ns 259.765 1.16 1563.72ns
Specific observable subscribe specific subscriber 67.41ns 49.4202 1.36 1224.79ns
Dynamic observable subscribe specific subscriber 191.44ns 169.497 1.13 1197.52ns
Specific observable subscribe dynamic observer 60.62ns 52.1738 1.16 1072.62ns
Dynamic observable subscribe dynamic observer 114.64ns 104.956 1.09 1101.00ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 2.10ns 1.58449 1.32 1.88ns
Dynamic observer construction 87.81ns 87.2662 1.01 130.70ns
Specific observer construction + as_dynamic 89.55ns 87.3038 1.03 122.43ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.73ns 0.771594 0.95 0.74ns
Dynamic observer OnNext 2.27ns 2.00768 1.13 2.36ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 99.10ns 85.1525 1.16 405.42ns
Make copy of subscriber 17.96ns 16.7106 1.07 36.57ns
Transform subsriber to dynamic 111.60ns 101.274 1.10 170.51ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 89.74ns 86.5966 1.04 397.54ns
composite_subscription add 89.95ns 71.5603 1.26 188.46ns
composite_subscription unsubscribe 74.72ns 63.8103 1.17 145.14ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 409.04ns 381.952 1.07 5417.00ns
sending of values from observable via buffer to subscriber 7.72ns 6.81421 1.13 110.34ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 323.69ns 284.532 1.14 2162.38ns
long stateful chain creation + subscribe 796.59ns 1281.2 0.62 3695.43ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1222.00ns 1076.7 1.13 3497.83ns
sending of values from observable via combine_latest to subscriber 41.03ns 35.9555 1.14 5.60ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2366.91ns 2072.0 1.14 13874.00ns
concat_with 3196.00ns 3373.0 0.95 12825.00ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 212.16ns 226.952 0.93 1151.92ns
sending of values from observable via distinct_until_changed to subscriber 4.08ns 4.42332 0.92 4.87ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 177.02ns 146.993 1.20 2903.33ns
sending of values from observable via first to subscriber 2.83ns 2.34689 1.21 1.22ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 98.76ns 82.0 1.20 2782.62ns
error 163.36ns 139.226 1.17 2925.56ns
never 67.01ns 51.2473 1.31 1037.40ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 193.09ns 157.179 1.23 2965.90ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.44ns 1.67647 0.86 525.43ns
re-schedule 10 times 132.72ns 151.55 0.88 470.44ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 98.98ns 92.662 1.07 2797.70ns
just send variadic 148.94ns 124.806 1.19 2973.10ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 119.86ns 104.31 1.15 1132.61ns
sending of values from observable via map to subscriber 3.76ns 3.6818 1.02 12.72ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2370.42ns 1943.15 1.22 14342.30ns
merge_with 4219.89ns 3299.8 1.28 14543.00ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 944.75ns 823.567 1.15 6370.40ns
sending of values from observable via observe_on to subscriber 90.31ns 86.8505 1.04 878.15ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 22.15ns 19.7483 1.12 38.87ns
on_error 3.43ns 3.38592 1.01 22.10ns
on_completed 2.90ns 3.03472 0.95 0.76ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 431.54ns 352.383 1.22 787.97ns
get_observable 34.21ns 28.4147 1.20 187.04ns
get_subscriber 56.50ns 50.2213 1.13 110.82ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 7070.25ns 6054.4 1.17 14208.30ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 220.13ns 207.685 1.06 1483.12ns
sending of values from observable via scan to subscriber 6.82ns 5.37385 1.27 11.15ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 236.22ns 194.235 1.22 1799.21ns
sending of values from observable via skip to subscriber 4.64ns 4.57511 1.02 4.55ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 3664.50ns 2947.67 1.24 14232.50ns
sending of values from observable via switch_on_next to subscriber 1003.48ns 792.182 1.27 3773.00ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 284.17ns 248.923 1.14 2523.55ns
sending of values from observable via take to subscriber 7.23ns 5.62516 1.29 7.54ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 402.92ns 557.203 0.72 2779.00ns
sending of values from observable via take_last to subscriber 5.05ns 4.42839 1.14 30.63ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 22.12ns 18.8539 1.17 736.47ns
re-schedule 10 times 147.80ns 120.797 1.22 792.78ns
recursively schedule 10 times 3398.00ns 2645.8 1.28 22744.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 3481.62ns 2972.56 1.17 11163.00ns
sending of values from observable via window to subscriber 1024.07ns 841.138 1.22 1970.00ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1357.42ns 1076.32 1.26 4581.00ns
sending of values from observable via with_latest_from to subscriber 61.07ns 29.6895 2.06 8.60ns

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@victimsnino victimsnino merged commit 1a72a9c into main Sep 6, 2022
@victimsnino victimsnino deleted the fix_race_condition branch September 6, 2022 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant