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 TSAN #544

Merged
merged 2 commits into from
Mar 15, 2024
Merged

fix TSAN #544

merged 2 commits into from
Mar 15, 2024

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 308.60 ns 2.16 ns 2.16 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 315.80 ns 2.16 ns 2.16 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 705.09 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1053.42 ns 5.25 ns 5.25 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2291.46 ns 110.94 ns 114.39 ns 0.97
defer from array of 1 - defer + create + subscribe + immediate 778.08 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2130.20 ns 59.23 ns 59.23 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3094.10 ns 32.75 ns 32.74 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1101.07 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 848.33 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1005.70 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 911.93 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1313.44 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 935.79 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1113.11 ns 17.91 ns 18.22 ns 0.98

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 272.00 ns 2.16 ns 2.16 ns 1.00
current_thread scheduler create worker + schedule 367.80 ns 7.10 ns 7.11 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 846.91 ns 67.40 ns 64.95 ns 1.04

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 895.87 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 917.43 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2336.99 ns 155.66 ns 159.07 ns 0.98
immediate_just+buffer(2)+subscribe 1534.65 ns 13.59 ns 13.90 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2342.57 ns 1027.65 ns 1047.67 ns 0.98

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 852.82 ns - - 0.00
immediate_just+take_while(true)+subscribe 876.03 ns 0.31 ns 0.31 ns 1.02

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2010.06 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.72 ns 183.04 ns 177.02 ns 1.03
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3722.51 ns 192.34 ns 170.72 ns 1.13
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 140.00 ns 139.21 ns 1.01
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3552.14 ns 1174.21 ns 930.28 ns 1.26
immediate_just(1) + zip(immediate_just(2)) + subscribe 2069.97 ns 209.32 ns 216.41 ns 0.97

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.46 ns 11.72 ns 12.03 ns 0.97

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1421.33 ns 14.59 ns 14.51 ns 1.01
basic sample with immediate scheduler 1417.19 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

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

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1031.58 ns 122.14 ns 122.87 ns 0.99

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 992.62 ns 3.87 ns 4.05 ns 0.95
Subscribe empty callbacks to empty observable via pipe operator 992.24 ns 3.84 ns 4.05 ns 0.95

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1960.91 ns 0.23 ns 0.23 ns 1.00
from array of 1 - create + subscribe + current_thread 2642.97 ns 25.39 ns 25.47 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 6131.27 ns 336.56 ns 327.94 ns 1.03
defer from array of 1 - defer + create + subscribe + immediate 2008.32 ns 0.23 ns 0.23 ns 1.00
interval - interval + take(3) + subscribe + immediate 4986.88 ns 113.84 ns 122.78 ns 0.93
interval - interval + take(3) + subscribe + current_thread 6222.41 ns 107.46 ns 117.12 ns 0.92

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2860.60 ns 0.23 ns 0.25 ns 0.93
immediate_just+filter(true)+subscribe 2130.40 ns 0.23 ns 0.25 ns 0.93
immediate_just(1,2)+skip(1)+subscribe 2845.38 ns 0.23 ns 0.25 ns 0.94
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2281.96 ns 0.48 ns 0.52 ns 0.93
immediate_just(1,2)+first()+subscribe 3247.81 ns 0.23 ns 0.25 ns 0.93
immediate_just(1,2)+last()+subscribe 2453.53 ns 0.24 ns 0.25 ns 0.93
immediate_just+take_last(1)+subscribe 3045.41 ns 70.10 ns 79.26 ns 0.88

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 866.17 ns 4.03 ns 4.85 ns 0.83
current_thread scheduler create worker + schedule 1210.55 ns 38.71 ns 38.48 ns 1.01
current_thread scheduler create worker + schedule + recursive schedule 2033.29 ns 225.59 ns 218.91 ns 1.03

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2107.54 ns 0.23 ns 0.27 ns 0.87
immediate_just+scan(10, std::plus)+subscribe 2380.03 ns 0.47 ns 0.48 ns 0.98
immediate_just+flat_map(immediate_just(v*2))+subscribe 5444.31 ns 420.38 ns 458.29 ns 0.92
immediate_just+buffer(2)+subscribe 2515.06 ns 67.85 ns 78.15 ns 0.87
immediate_just+window(2)+subscribe + subscsribe inner 5369.58 ns 2311.35 ns 2534.48 ns 0.91

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2069.22 ns - - 0.00
immediate_just+take_while(true)+subscribe 2673.24 ns 0.23 ns 0.27 ns 0.84

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 5634.49 ns 0.25 ns 0.27 ns 0.94

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 7551.97 ns 450.75 ns 452.85 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 8562.31 ns 446.07 ns 447.38 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 474.52 ns 477.81 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 8146.57 ns 1891.68 ns 2001.28 ns 0.95
immediate_just(1) + zip(immediate_just(2)) + subscribe 5242.04 ns 851.67 ns 901.45 ns 0.94

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 79.00 ns 54.76 ns 52.03 ns 1.05

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2813.27 ns 109.95 ns 116.81 ns 0.94
basic sample with immediate scheduler 2920.64 ns 14.42 ns 16.11 ns 0.90

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2600.81 ns 0.26 ns 0.24 ns 1.06

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 7721.82 ns 4791.77 ns 4169.46 ns 1.15

ci-ubuntu-clang

General

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

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 571.73 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 799.88 ns 5.59 ns 5.55 ns 1.01
concat_as_source of just(1 immediate) create + subscribe 1877.18 ns 114.50 ns 114.17 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 595.67 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 1544.48 ns 58.26 ns 58.26 ns 1.00
interval - interval + take(3) + subscribe + current_thread 2093.62 ns 31.47 ns 31.47 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 905.96 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 653.56 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 847.18 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 698.91 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1087.20 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 740.94 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 954.10 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 202.52 ns 0.88 ns 0.88 ns 1.00
current_thread scheduler create worker + schedule 316.75 ns 5.58 ns 5.89 ns 0.95
current_thread scheduler create worker + schedule + recursive schedule 626.92 ns 59.34 ns 59.57 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 653.29 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 715.53 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 1923.16 ns 127.49 ns 119.13 ns 1.07
immediate_just+buffer(2)+subscribe 1339.99 ns 13.89 ns 14.50 ns 0.96
immediate_just+window(2)+subscribe + subscsribe inner 2206.57 ns 809.47 ns 811.84 ns 1.00

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1609.37 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 2540.30 ns 125.47 ns 126.48 ns 0.99
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3055.90 ns 121.38 ns 121.78 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 110.22 ns 110.24 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 2617.16 ns 728.85 ns 726.85 ns 1.00
immediate_just(1) + zip(immediate_just(2)) + subscribe 1779.95 ns 178.08 ns 165.34 ns 1.08

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 30.84 ns 14.18 ns 13.87 ns 1.02

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1046.13 ns 13.29 ns 13.28 ns 1.00
basic sample with immediate scheduler 1006.88 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

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

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 858.15 ns 126.36 ns 125.86 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 589.29 ns 4.94 ns 4.94 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 601.83 ns 4.94 ns 4.93 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1193.93 ns 5.55 ns 5.55 ns 1.00
from array of 1 - create + subscribe + current_thread 1458.89 ns 18.52 ns 18.52 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 4733.47 ns 173.50 ns 169.19 ns 1.03
defer from array of 1 - defer + create + subscribe + immediate 1229.98 ns 5.55 ns 5.55 ns 1.00
interval - interval + take(3) + subscribe + immediate 3140.11 ns 133.73 ns 133.72 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3525.15 ns 58.96 ns 58.71 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1907.05 ns 12.87 ns 12.88 ns 1.00
immediate_just+filter(true)+subscribe 1772.92 ns 11.70 ns 11.71 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1810.86 ns 13.12 ns 13.13 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1431.62 ns 15.82 ns 15.81 ns 1.00
immediate_just(1,2)+first()+subscribe 2121.67 ns 12.95 ns 12.95 ns 1.00
immediate_just(1,2)+last()+subscribe 1513.52 ns 14.11 ns 14.10 ns 1.00
immediate_just+take_last(1)+subscribe 2101.10 ns 60.05 ns 59.18 ns 1.01

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 504.95 ns 6.18 ns 6.17 ns 1.00
current_thread scheduler create worker + schedule 685.49 ns 18.20 ns 18.21 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1135.33 ns 116.59 ns 116.49 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1356.41 ns 11.23 ns 11.19 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1469.04 ns 21.59 ns 21.60 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 4063.51 ns 228.97 ns 233.82 ns 0.98
immediate_just+buffer(2)+subscribe 2389.35 ns 59.88 ns 59.46 ns 1.01
immediate_just+window(2)+subscribe + subscsribe inner 4205.28 ns 1590.15 ns 1501.79 ns 1.06

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1370.16 ns 11.45 ns 11.45 ns 1.00
immediate_just+take_while(true)+subscribe 1379.83 ns 11.72 ns 11.72 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3613.17 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 5165.10 ns 252.53 ns 257.03 ns 0.98
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 6614.56 ns 235.85 ns 240.31 ns 0.98
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 238.56 ns 233.58 ns 1.02
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 6286.26 ns 960.68 ns 974.08 ns 0.99
immediate_just(1) + zip(immediate_just(2)) + subscribe 3995.49 ns 549.08 ns 533.96 ns 1.03

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 53.73 ns 26.51 ns 26.51 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1999.62 ns 64.00 ns 59.67 ns 1.07
basic sample with immediate scheduler 1927.68 ns 35.52 ns 35.50 ns 1.00

Aggregating Operators

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

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1975.55 ns 336.54 ns 338.19 ns 1.00

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@victimsnino victimsnino merged commit 7c0e49d into v2 Mar 15, 2024
27 checks passed
@victimsnino victimsnino deleted the fix_tsan branch March 15, 2024 07:41
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