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 subscribe #500

Merged
merged 3 commits into from
Dec 26, 2023
Merged

Fix subscribe #500

merged 3 commits into from
Dec 26, 2023

Conversation

victimsnino
Copy link
Owner

No description provided.

Copy link
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 303.97 ns 1.54 ns 1.24 ns 1.25
Subscribe empty callbacks to empty observable via pipe operator 302.43 ns 1.55 ns 1.23 ns 1.25

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 687.99 ns 0.62 ns 0.62 ns 1.00
from array of 1 - create + subscribe + current_thread 1026.69 ns 4.63 ns 4.95 ns 0.94
concat_as_source of just(1 immediate) create + subscribe 2262.65 ns 80.12 ns 79.18 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 725.13 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2125.37 ns 58.01 ns 58.02 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3009.10 ns 32.10 ns 32.12 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1080.95 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 824.58 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 999.09 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 854.67 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1228.23 ns 0.62 ns 0.62 ns 1.00
immediate_just(1,2)+last()+subscribe 927.93 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1129.17 ns 18.52 ns 18.20 ns 1.02

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 267.13 ns 1.54 ns 1.24 ns 1.25
current_thread scheduler create worker + schedule 367.28 ns 5.56 ns 5.56 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 803.94 ns 63.76 ns 65.50 ns 0.97

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 841.72 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 902.96 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2351.45 ns 97.29 ns 96.34 ns 1.01
immediate_just+buffer(2)+subscribe 1530.57 ns 14.22 ns 13.90 ns 1.02
immediate_just+window(2)+subscribe + subscsribe inner 2415.43 ns 693.26 ns 697.41 ns 0.99

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 820.02 ns - - 0.00
immediate_just+take_while(true)+subscribe 820.67 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1997.42 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3418.86 ns 113.00 ns 113.00 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3716.80 ns 108.83 ns 107.61 ns 1.01
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 86.60 ns 86.89 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3557.58 ns 482.31 ns 475.70 ns 1.01

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.48 ns 23.45 ns 23.25 ns 1.01

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1495.19 ns 14.82 ns 14.82 ns 1.00
basic sample with immediate scheduler 1410.58 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 919.70 ns 0.31 ns 0.31 ns 1.00

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 994.85 ns 3.03 ns 16.56 ns 0.18
Subscribe empty callbacks to empty observable via pipe operator 995.26 ns 3.03 ns 25.98 ns 0.12

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1951.45 ns 0.23 ns 1.68 ns 0.14
from array of 1 - create + subscribe + current_thread 2477.00 ns 25.77 ns 116.71 ns 0.22
concat_as_source of just(1 immediate) create + subscribe 5452.11 ns 251.51 ns 699.06 ns 0.36
defer from array of 1 - defer + create + subscribe + immediate 1992.16 ns 0.23 ns 0.36 ns 0.64
interval - interval + take(3) + subscribe + immediate 5003.31 ns 114.90 ns 151.00 ns 0.76
interval - interval + take(3) + subscribe + current_thread 6070.23 ns 109.59 ns 146.78 ns 0.75

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2832.83 ns 0.23 ns 0.42 ns 0.54
immediate_just+filter(true)+subscribe 2146.08 ns 0.23 ns 0.32 ns 0.72
immediate_just(1,2)+skip(1)+subscribe 2807.08 ns 0.23 ns 0.32 ns 0.74
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2098.78 ns 0.47 ns 0.63 ns 0.74
immediate_just(1,2)+first()+subscribe 3252.57 ns 0.23 ns 0.30 ns 0.76
immediate_just(1,2)+last()+subscribe 2413.24 ns 0.23 ns 0.31 ns 0.76
immediate_just+take_last(1)+subscribe 2986.80 ns 70.34 ns 100.56 ns 0.70

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 867.61 ns 2.63 ns 3.49 ns 0.75
current_thread scheduler create worker + schedule 1217.68 ns 35.99 ns 44.51 ns 0.81
current_thread scheduler create worker + schedule + recursive schedule 2011.52 ns 223.15 ns 244.63 ns 0.91

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2058.41 ns 0.22 ns 0.32 ns 0.71
immediate_just+scan(10, std::plus)+subscribe 2264.82 ns 0.45 ns 0.62 ns 0.72
immediate_just+flat_map(immediate_just(v*2))+subscribe 5124.26 ns 316.61 ns 454.42 ns 0.70
immediate_just+buffer(2)+subscribe 2402.62 ns 67.73 ns 95.30 ns 0.71
immediate_just+window(2)+subscribe + subscsribe inner 5286.29 ns 1852.31 ns 2845.66 ns 0.65

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2047.12 ns - - 0.00
immediate_just+take_while(true)+subscribe 2050.68 ns 0.22 ns 0.31 ns 0.72

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 5003.98 ns 0.23 ns 0.35 ns 0.66

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 7526.53 ns 367.32 ns 493.16 ns 0.74
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 8072.18 ns 361.83 ns 499.85 ns 0.72
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 380.02 ns 533.31 ns 0.71
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 7683.89 ns 1337.62 ns 1949.82 ns 0.69

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 76.37 ns 71.36 ns 104.18 ns 0.68

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2804.43 ns 109.78 ns 151.61 ns 0.72
basic sample with immediate scheduler 2775.05 ns 14.93 ns 20.71 ns 0.72

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2398.97 ns 0.23 ns 0.42 ns 0.56

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 265.69 ns 0.91 ns 0.88 ns 1.04
Subscribe empty callbacks to empty observable via pipe operator 267.21 ns 0.88 ns 0.88 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 563.22 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 783.80 ns 5.56 ns 5.56 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 1866.91 ns 72.05 ns 72.01 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 572.98 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 1523.36 ns 57.07 ns 57.08 ns 1.00
interval - interval + take(3) + subscribe + current_thread 2117.56 ns 30.88 ns 30.88 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 932.74 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 658.17 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 868.78 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 696.92 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1070.99 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 765.38 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 963.04 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 191.57 ns 0.89 ns 0.88 ns 1.02
current_thread scheduler create worker + schedule 303.16 ns 5.56 ns 5.56 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 619.87 ns 57.59 ns 57.77 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 661.18 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 700.00 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 1815.50 ns 77.76 ns 78.36 ns 0.99
immediate_just+buffer(2)+subscribe 1376.88 ns 13.28 ns 14.19 ns 0.94
immediate_just+window(2)+subscribe + subscsribe inner 2123.11 ns 595.39 ns 629.48 ns 0.95

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 648.20 ns - - 0.00
immediate_just+take_while(true)+subscribe 648.36 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1576.08 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 2459.26 ns 83.84 ns 86.07 ns 0.97
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 2973.20 ns 92.53 ns 94.21 ns 0.98
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 78.52 ns 79.30 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 2622.45 ns 545.01 ns 550.23 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 26.39 ns 24.46 ns 23.56 ns 1.04

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1047.37 ns 13.58 ns 13.58 ns 1.00
basic sample with immediate scheduler 1033.75 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 737.91 ns 0.31 ns 0.31 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 568.97 ns 3.09 ns 2.47 ns 1.25
Subscribe empty callbacks to empty observable via pipe operator 584.11 ns 3.09 ns 2.47 ns 1.25

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1163.34 ns 4.93 ns 4.93 ns 1.00
from array of 1 - create + subscribe + current_thread 1422.46 ns 19.74 ns 46.45 ns 0.43
concat_as_source of just(1 immediate) create + subscribe 4715.49 ns 156.23 ns 156.65 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 1213.85 ns 4.93 ns 4.94 ns 1.00
interval - interval + take(3) + subscribe + immediate 3141.48 ns 130.85 ns 129.67 ns 1.01
interval - interval + take(3) + subscribe + current_thread 3492.19 ns 60.45 ns 65.24 ns 0.93

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1865.15 ns 12.84 ns 12.87 ns 1.00
immediate_just+filter(true)+subscribe 1351.32 ns 12.32 ns 12.33 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1748.86 ns 13.05 ns 13.09 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1361.57 ns 15.94 ns 16.05 ns 0.99
immediate_just(1,2)+first()+subscribe 2412.93 ns 12.95 ns 12.64 ns 1.02
immediate_just(1,2)+last()+subscribe 1494.74 ns 14.11 ns 14.10 ns 1.00
immediate_just+take_last(1)+subscribe 2075.14 ns 59.36 ns 59.22 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 492.22 ns 4.94 ns 4.94 ns 1.00
current_thread scheduler create worker + schedule 684.44 ns 16.97 ns 31.76 ns 0.53
current_thread scheduler create worker + schedule + recursive schedule 1099.67 ns 104.02 ns 105.33 ns 0.99

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1329.15 ns 12.33 ns 12.35 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1454.76 ns 21.27 ns 21.61 ns 0.98
immediate_just+flat_map(immediate_just(v*2))+subscribe 3576.67 ns 198.39 ns 198.93 ns 1.00
immediate_just+buffer(2)+subscribe 2670.94 ns 61.45 ns 62.04 ns 0.99
immediate_just+window(2)+subscribe + subscsribe inner 4126.52 ns 1097.68 ns 1109.92 ns 0.99

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1591.35 ns 11.45 ns 11.46 ns 1.00
immediate_just+take_while(true)+subscribe 1347.63 ns 12.32 ns 12.32 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3197.32 ns 7.71 ns 7.71 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 5415.92 ns 240.16 ns 241.42 ns 0.99
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 6503.59 ns 212.76 ns 212.13 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 218.04 ns 217.77 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 6298.42 ns 737.39 ns 734.73 ns 1.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.12 ns 41.33 ns 36.10 ns 1.14

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1908.66 ns 60.01 ns 59.68 ns 1.01
basic sample with immediate scheduler 1905.70 ns 36.72 ns 35.20 ns 1.04

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1799.85 ns 20.01 ns 19.98 ns 1.00

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (be1d49d) 95.54% compared to head (4b45ffa) 95.54%.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2     #500   +/-   ##
=======================================
  Coverage   95.54%   95.54%           
=======================================
  Files          76       76           
  Lines        1907     1907           
=======================================
  Hits         1822     1822           
  Misses         85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@victimsnino victimsnino marked this pull request as ready for review December 26, 2023 10:04
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@victimsnino victimsnino merged commit 4dbb088 into v2 Dec 26, 2023
28 checks passed
@victimsnino victimsnino deleted the fix_subscribe branch December 26, 2023 10:13
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