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

Proper forwarding for subjects #503

Merged
merged 7 commits into from
Jan 8, 2024
Merged

Proper forwarding for subjects #503

merged 7 commits into from
Jan 8, 2024

Conversation

victimsnino
Copy link
Owner

No description provided.

Copy link
Contributor

github-actions bot commented Jan 7, 2024

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 305.34 ns 1.54 ns 1.54 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 305.64 ns 1.54 ns 1.54 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 688.97 ns 0.62 ns 0.62 ns 1.00
from array of 1 - create + subscribe + current_thread 1033.61 ns 4.63 ns 4.63 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2245.89 ns 79.39 ns 87.77 ns 0.90
defer from array of 1 - defer + create + subscribe + immediate 737.12 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2110.60 ns 58.02 ns 58.31 ns 0.99
interval - interval + take(3) + subscribe + current_thread 3047.43 ns 32.12 ns 32.10 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1088.35 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 842.16 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 984.27 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 851.98 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1221.98 ns 0.62 ns 0.62 ns 1.00
immediate_just(1,2)+last()+subscribe 940.14 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1157.55 ns 18.88 ns 18.20 ns 1.04

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 262.37 ns 1.54 ns 1.54 ns 1.00
current_thread scheduler create worker + schedule 370.71 ns 5.56 ns 5.56 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 844.13 ns 72.70 ns 65.59 ns 1.11

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 888.81 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 893.55 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2350.82 ns 96.97 ns 95.81 ns 1.01
immediate_just+buffer(2)+subscribe 1534.73 ns 14.55 ns 13.89 ns 1.05
immediate_just+window(2)+subscribe + subscsribe inner 2401.20 ns 699.41 ns 689.44 ns 1.01

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1974.97 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 3379.90 ns 115.02 ns 114.06 ns 1.01
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3679.28 ns 108.43 ns 111.23 ns 0.97
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 86.90 ns 86.82 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3580.67 ns 476.86 ns 510.00 ns 0.94

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.55 ns 23.15 ns 23.40 ns 0.99

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1374.58 ns 14.82 ns 14.82 ns 1.00
basic sample with immediate scheduler 1376.99 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

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

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1284.80 ns 4.98 ns 3.41 ns 1.46
Subscribe empty callbacks to empty observable via pipe operator 1275.69 ns 3.08 ns 3.52 ns 0.88

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 2593.43 ns 0.31 ns 0.44 ns 0.70
from array of 1 - create + subscribe + current_thread 3283.03 ns 34.85 ns 8.91 ns 3.91
concat_as_source of just(1 immediate) create + subscribe 7530.06 ns 349.54 ns 296.61 ns 1.18
defer from array of 1 - defer + create + subscribe + immediate 2841.21 ns 0.32 ns 0.28 ns 1.13
interval - interval + take(3) + subscribe + immediate 7119.91 ns 164.43 ns 94.09 ns 1.75
interval - interval + take(3) + subscribe + current_thread 8695.76 ns 155.61 ns 60.81 ns 2.56

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 4020.41 ns 0.31 ns 0.28 ns 1.13
immediate_just+filter(true)+subscribe 3020.44 ns 0.34 ns 0.28 ns 1.21
immediate_just(1,2)+skip(1)+subscribe 3880.27 ns 0.33 ns 0.29 ns 1.11
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2896.97 ns 0.65 ns 0.56 ns 1.17
immediate_just(1,2)+first()+subscribe 4495.92 ns 0.33 ns 0.28 ns 1.16
immediate_just(1,2)+last()+subscribe 3357.65 ns 0.33 ns 0.29 ns 1.14
immediate_just+take_last(1)+subscribe 4524.14 ns 106.96 ns 78.21 ns 1.37

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 1214.80 ns 4.46 ns 3.93 ns 1.13
current_thread scheduler create worker + schedule 1567.66 ns 45.91 ns 13.90 ns 3.30
current_thread scheduler create worker + schedule + recursive schedule 2870.36 ns 304.01 ns 159.32 ns 1.91

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2772.48 ns 0.31 ns 0.29 ns 1.04
immediate_just+scan(10, std::plus)+subscribe 3107.10 ns 0.61 ns 0.56 ns 1.09
immediate_just+flat_map(immediate_just(v*2))+subscribe 7004.22 ns 435.11 ns 350.79 ns 1.24
immediate_just+buffer(2)+subscribe 3246.21 ns 92.12 ns 74.03 ns 1.24
immediate_just+window(2)+subscribe + subscsribe inner 6997.34 ns 2471.59 ns 2227.85 ns 1.11

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2761.32 ns - - 0.00
immediate_just+take_while(true)+subscribe 2788.32 ns 0.31 ns 0.30 ns 1.02

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 6781.12 ns 0.32 ns 0.28 ns 1.16

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 11554.79 ns 554.39 ns 400.26 ns 1.39
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 10950.00 ns 492.97 ns 410.10 ns 1.20
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 529.65 ns 399.36 ns 1.33
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 10522.98 ns 1884.05 ns 1738.48 ns 1.08

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 99.23 ns 98.79 ns 92.87 ns 1.06

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 3628.24 ns 137.88 ns 44.63 ns 3.09
basic sample with immediate scheduler 3605.91 ns 18.79 ns 6.41 ns 2.93

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 3207.22 ns 0.32 ns 0.28 ns 1.13

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 270.85 ns 0.88 ns 0.88 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 265.49 ns 0.88 ns 0.88 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 566.12 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 802.35 ns 5.55 ns 5.55 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 1906.02 ns 72.03 ns 71.86 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 573.61 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 1540.48 ns 57.09 ns 57.09 ns 1.00
interval - interval + take(3) + subscribe + current_thread 2092.12 ns 30.86 ns 30.86 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 930.49 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 639.85 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 853.99 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 685.07 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1065.18 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 760.25 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 964.80 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 203.99 ns 0.88 ns 0.88 ns 1.01
current_thread scheduler create worker + schedule 306.30 ns 5.56 ns 5.57 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 623.51 ns 58.29 ns 58.42 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 663.32 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 726.97 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 1794.51 ns 78.92 ns 78.52 ns 1.01
immediate_just+buffer(2)+subscribe 1368.98 ns 13.89 ns 14.20 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2162.05 ns 581.69 ns 592.79 ns 0.98

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1622.99 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 2602.67 ns 86.74 ns 86.81 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3045.40 ns 97.33 ns 95.87 ns 1.02
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 82.11 ns 82.42 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 2660.33 ns 546.23 ns 547.16 ns 1.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 23.50 ns 24.35 ns 24.44 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1052.65 ns 13.61 ns 13.58 ns 1.00
basic sample with immediate scheduler 1052.00 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

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

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 573.70 ns 3.09 ns 3.08 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 588.70 ns 3.09 ns 3.08 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1179.57 ns 4.93 ns 4.94 ns 1.00
from array of 1 - create + subscribe + current_thread 1427.44 ns 19.76 ns 19.74 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 4619.92 ns 156.91 ns 155.53 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 1210.10 ns 4.94 ns 4.94 ns 1.00
interval - interval + take(3) + subscribe + immediate 3110.18 ns 131.00 ns 130.98 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3469.86 ns 60.45 ns 60.47 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1888.40 ns 12.82 ns 12.82 ns 1.00
immediate_just+filter(true)+subscribe 1354.58 ns 12.33 ns 12.32 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1778.20 ns 13.05 ns 13.16 ns 0.99
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1647.63 ns 15.93 ns 15.92 ns 1.00
immediate_just(1,2)+first()+subscribe 2081.74 ns 12.96 ns 12.95 ns 1.00
immediate_just(1,2)+last()+subscribe 1506.23 ns 14.11 ns 14.10 ns 1.00
immediate_just+take_last(1)+subscribe 2077.11 ns 59.46 ns 59.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 496.33 ns 4.94 ns 4.94 ns 1.00
current_thread scheduler create worker + schedule 672.59 ns 17.59 ns 17.58 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1106.72 ns 104.76 ns 104.81 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1358.79 ns 12.34 ns 12.35 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1462.84 ns 21.27 ns 21.29 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 4012.85 ns 201.25 ns 204.60 ns 0.98
immediate_just+buffer(2)+subscribe 2345.79 ns 61.14 ns 61.33 ns 1.00
immediate_just+window(2)+subscribe + subscsribe inner 4135.69 ns 1104.24 ns 1087.86 ns 1.02

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3209.95 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 5350.26 ns 242.26 ns 242.83 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 6429.61 ns 211.26 ns 212.07 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 221.38 ns 218.24 ns 1.01
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 5906.74 ns 743.52 ns 793.69 ns 0.94

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.19 ns 36.10 ns 36.09 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1932.53 ns 60.12 ns 59.52 ns 1.01
basic sample with immediate scheduler 1918.36 ns 35.17 ns 35.17 ns 1.00

Aggregating Operators

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

Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (80bc0d3) 95.57% compared to head (12e9728) 95.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2     #503   +/-   ##
=======================================
  Coverage   95.57%   95.57%           
=======================================
  Files          77       77           
  Lines        1919     1919           
=======================================
  Hits         1834     1834           
  Misses         85       85           

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

Copy link

sonarqubecloud bot commented Jan 8, 2024

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 marked this pull request as ready for review January 8, 2024 08:11
@victimsnino victimsnino merged commit 94b43fc into v2 Jan 8, 2024
28 checks passed
@victimsnino victimsnino deleted the proper_forwarding branch January 8, 2024 08:11
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