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 order of calls #638

Merged
merged 2 commits into from
Sep 5, 2024
Merged

fix order of calls #638

merged 2 commits into from
Sep 5, 2024

Conversation

victimsnino
Copy link
Owner

@victimsnino victimsnino commented Sep 5, 2024

Summary by CodeRabbit

  • Improvements
    • Enhanced code readability by introducing intermediate variables for queue operations, making the logic clearer without changing functionality.

Copy link
Contributor

coderabbitai bot commented Sep 5, 2024

Walkthrough

Walkthrough

The changes involve modifications in the current_thread.hpp and new_thread.hpp files, where the handling of the result from the handle_advanced_call method is updated. In both files, the result is now stored in a variable before being passed to the emplace function of a queue, enhancing code readability without altering the program's logic or control flow.

Changes

Files Change Summary
src/rpp/rpp/schedulers/current_thread.hpp, src/rpp/rpp/schedulers/new_thread.hpp Refactored the handling of the result from handle_advanced_call by storing it in a variable before passing it to emplace, improving readability.

Sequence Diagram(s)

sequenceDiagram
    participant Scheduler
    participant Queue
    participant Top

    Scheduler->>Top: handle_advanced_call()
    Top-->>Scheduler: result
    Scheduler->>Scheduler: tp = result
    Scheduler->>Queue: emplace(tp)
Loading

Poem

In the meadow where bunnies play,
Changes hop in a bright new way.
With a flick of the ear,
Code is now clear,
Making our coding a joyful ballet! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 75d1a47 and 71c8268.

Files selected for processing (2)
  • src/rpp/rpp/schedulers/current_thread.hpp (1 hunks)
  • src/rpp/rpp/schedulers/new_thread.hpp (1 hunks)
Files skipped from review due to trivial changes (2)
  • src/rpp/rpp/schedulers/current_thread.hpp
  • src/rpp/rpp/schedulers/new_thread.hpp

Copy link
Contributor

github-actions bot commented Sep 5, 2024

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 302.74 ns 2.16 ns 2.18 ns 0.99
Subscribe empty callbacks to empty observable via pipe operator 307.27 ns 2.16 ns 2.16 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 701.57 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1056.31 ns 3.45 ns 3.70 ns 0.93
concat_as_source of just(1 immediate) create + subscribe 2251.40 ns 102.67 ns 100.56 ns 1.02
defer from array of 1 - defer + create + subscribe + immediate 726.39 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2114.76 ns 59.23 ns 59.23 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3020.69 ns 32.42 ns 32.43 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 30429.62 ns 31743.84 ns 28222.53 ns 1.12
from array of 1000 - create + as_blocking + subscribe + new_thread 42790.00 ns 55649.95 ns 49211.27 ns 1.13
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3554.89 ns 123.22 ns 121.00 ns 1.02

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1115.23 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 856.98 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1031.00 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 907.68 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1271.16 ns 0.31 ns 0.62 ns 0.50
immediate_just(1,2)+last()+subscribe 934.27 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1148.30 ns 17.91 ns 17.91 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 861.64 ns 0.31 ns 0.31 ns 0.99

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 265.60 ns 2.16 ns 2.16 ns 1.00
current_thread scheduler create worker + schedule 363.55 ns 5.87 ns 5.56 ns 1.06
current_thread scheduler create worker + schedule + recursive schedule 817.57 ns 55.59 ns 56.68 ns 0.98

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 840.68 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 897.26 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2332.26 ns 168.49 ns 167.56 ns 1.01
immediate_just+buffer(2)+subscribe 1534.29 ns 13.59 ns 13.58 ns 1.00
immediate_just+window(2)+subscribe + subscsribe inner 2376.72 ns 1193.71 ns 1102.05 ns 1.08

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1986.95 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.50 ns 175.46 ns 174.45 ns 1.01
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3673.48 ns 178.53 ns 175.66 ns 1.02
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 130.59 ns 141.55 ns 0.92
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3657.31 ns 990.35 ns 944.83 ns 1.05
immediate_just(1) + zip(immediate_just(2)) + subscribe 2153.57 ns 202.07 ns 203.09 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.63 ns 14.60 ns 14.59 ns 1.00
subscribe 100 observers to publish_subject 199450.60 ns 15632.10 ns 15502.24 ns 1.01
100 on_next to 100 observers to publish_subject 28069.24 ns 20306.90 ns 20231.98 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1500.79 ns 13.28 ns 13.89 ns 0.96
basic sample with immediate scheduler 1437.34 ns 5.24 ns 5.55 ns 0.95

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 927.36 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 2044.06 ns 995.69 ns 993.00 ns 1.00
create(on_error())+retry(1)+subscribe 589.50 ns 100.29 ns 108.14 ns 0.93

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 970.42 ns 3.83 ns 6.49 ns 0.59
Subscribe empty callbacks to empty observable via pipe operator 970.42 ns 3.85 ns 5.23 ns 0.74

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1930.56 ns 0.23 ns 0.30 ns 0.79
from array of 1 - create + subscribe + current_thread 2424.15 ns 33.77 ns 40.86 ns 0.83
concat_as_source of just(1 immediate) create + subscribe 5412.41 ns 356.33 ns 424.07 ns 0.84
defer from array of 1 - defer + create + subscribe + immediate 1959.54 ns 0.23 ns 0.35 ns 0.66
interval - interval + take(3) + subscribe + immediate 4944.56 ns 113.68 ns 145.53 ns 0.78
interval - interval + take(3) + subscribe + current_thread 6000.99 ns 97.29 ns 135.92 ns 0.72
from array of 1 - create + as_blocking + subscribe + new_thread 94533.58 ns 96284.73 ns 121325.50 ns 0.79
from array of 1000 - create + as_blocking + subscribe + new_thread 90709.77 ns 97711.82 ns 120692.62 ns 0.81
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 8164.04 ns 400.44 ns 500.59 ns 0.80

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2832.45 ns 0.23 ns 0.36 ns 0.65
immediate_just+filter(true)+subscribe 2100.09 ns 0.23 ns 0.65 ns 0.36
immediate_just(1,2)+skip(1)+subscribe 2725.42 ns 0.23 ns 0.30 ns 0.79
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2049.31 ns 0.47 ns 0.75 ns 0.62
immediate_just(1,2)+first()+subscribe 3160.24 ns 0.23 ns 0.32 ns 0.72
immediate_just(1,2)+last()+subscribe 2371.24 ns 0.23 ns 0.30 ns 0.79
immediate_just+take_last(1)+subscribe 2993.74 ns 0.24 ns 0.35 ns 0.68
immediate_just(1,2,3)+element_at(1)+subscribe 2105.57 ns 0.23 ns 0.37 ns 0.64

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 842.27 ns 4.15 ns 8.42 ns 0.49
current_thread scheduler create worker + schedule 1176.86 ns 38.82 ns 47.03 ns 0.83
current_thread scheduler create worker + schedule + recursive schedule 1960.86 ns 222.95 ns 262.47 ns 0.85

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2107.71 ns 4.43 ns 6.19 ns 0.72
immediate_just+scan(10, std::plus)+subscribe 2335.97 ns 0.47 ns 1.07 ns 0.44
immediate_just+flat_map(immediate_just(v*2))+subscribe 5265.90 ns 422.57 ns 532.14 ns 0.79
immediate_just+buffer(2)+subscribe 2475.92 ns 64.15 ns 86.57 ns 0.74
immediate_just+window(2)+subscribe + subscsribe inner 5395.91 ns 2565.53 ns 3116.47 ns 0.82

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2081.77 ns - - 0.00
immediate_just+take_while(true)+subscribe 2099.55 ns 0.25 ns 0.61 ns 0.40

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 4886.13 ns 4.90 ns 7.29 ns 0.67

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 7451.77 ns 452.30 ns 805.41 ns 0.56
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 8355.48 ns 454.12 ns 568.97 ns 0.80
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 473.78 ns 847.87 ns 0.56
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 7896.11 ns 1996.65 ns 3418.18 ns 0.58
immediate_just(1) + zip(immediate_just(2)) + subscribe 5075.76 ns 867.09 ns 1657.85 ns 0.52

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 75.84 ns 48.80 ns 72.69 ns 0.67
subscribe 100 observers to publish_subject 347121.00 ns 41335.89 ns 58600.17 ns 0.71
100 on_next to 100 observers to publish_subject 49710.65 ns 16599.32 ns 22818.83 ns 0.73

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2806.24 ns 69.52 ns 111.35 ns 0.62
basic sample with immediate scheduler 3410.05 ns 19.83 ns 32.82 ns 0.60

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2387.79 ns 0.23 ns 0.62 ns 0.38

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 6455.96 ns 4160.70 ns 9318.59 ns 0.45
create(on_error())+retry(1)+subscribe 1796.72 ns 299.96 ns 364.62 ns 0.82

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 274.35 ns 1.54 ns 1.56 ns 0.99
Subscribe empty callbacks to empty observable via pipe operator 282.35 ns 1.54 ns 1.54 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 560.24 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 790.82 ns 4.32 ns 4.36 ns 0.99
concat_as_source of just(1 immediate) create + subscribe 2329.85 ns 129.87 ns 130.25 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 775.57 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2217.05 ns 58.26 ns 58.30 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3179.05 ns 30.88 ns 30.88 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 29669.36 ns 31019.68 ns 28176.45 ns 1.10
from array of 1000 - create + as_blocking + subscribe + new_thread 38186.68 ns 36846.94 ns 37333.68 ns 0.99
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3794.05 ns 149.92 ns 149.48 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1147.89 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 845.28 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1064.04 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 882.99 ns 0.31 ns 0.62 ns 0.50
immediate_just(1,2)+first()+subscribe 1373.66 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 1021.86 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1201.64 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 859.23 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 279.91 ns 1.54 ns 1.54 ns 1.00
current_thread scheduler create worker + schedule 389.43 ns 4.94 ns 4.78 ns 1.03
current_thread scheduler create worker + schedule + recursive schedule 857.10 ns 55.35 ns 56.33 ns 0.98

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 841.65 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 957.76 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2217.79 ns 138.56 ns 137.64 ns 1.01
immediate_just+buffer(2)+subscribe 1502.05 ns 13.58 ns 13.58 ns 1.00
immediate_just+window(2)+subscribe + subscsribe inner 2482.00 ns 925.00 ns 968.03 ns 0.96

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2011.30 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 3297.67 ns 166.70 ns 158.44 ns 1.05
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3753.53 ns 150.17 ns 146.42 ns 1.03
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 143.52 ns 145.20 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3414.18 ns 836.93 ns 865.50 ns 0.97
immediate_just(1) + zip(immediate_just(2)) + subscribe 2202.54 ns 201.71 ns 200.26 ns 1.01

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 54.40 ns 17.56 ns 17.68 ns 0.99
subscribe 100 observers to publish_subject 212176.20 ns 16060.96 ns 16092.61 ns 1.00
100 on_next to 100 observers to publish_subject 42769.89 ns 20485.79 ns 20491.95 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1293.81 ns 11.72 ns 12.04 ns 0.97
basic sample with immediate scheduler 1283.81 ns 6.17 ns 5.86 ns 1.05

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 996.77 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 2150.43 ns 1266.31 ns 1242.86 ns 1.02
create(on_error())+retry(1)+subscribe 652.21 ns 138.18 ns 138.63 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 563.72 ns 4.94 ns 4.32 ns 1.14
Subscribe empty callbacks to empty observable via pipe operator 583.52 ns 4.94 ns 4.32 ns 1.14

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1155.24 ns 9.79 ns 9.64 ns 1.02
from array of 1 - create + subscribe + current_thread 1418.44 ns 17.62 ns 17.90 ns 0.98
concat_as_source of just(1 immediate) create + subscribe 3744.95 ns 175.51 ns 188.89 ns 0.93
defer from array of 1 - defer + create + subscribe + immediate 1185.63 ns 9.41 ns 9.41 ns 1.00
interval - interval + take(3) + subscribe + immediate 3250.86 ns 144.43 ns 145.23 ns 0.99
interval - interval + take(3) + subscribe + current_thread 3408.33 ns 65.29 ns 64.77 ns 1.01
from array of 1 - create + as_blocking + subscribe + new_thread 119190.00 ns 111900.00 ns 114800.00 ns 0.97
from array of 1000 - create + as_blocking + subscribe + new_thread 136300.00 ns 139933.33 ns 130937.50 ns 1.07
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 5323.91 ns 220.51 ns 212.61 ns 1.04

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1820.07 ns 24.97 ns 25.29 ns 0.99
immediate_just+filter(true)+subscribe 1311.31 ns 24.05 ns 24.36 ns 0.99
immediate_just(1,2)+skip(1)+subscribe 1727.79 ns 23.45 ns 24.07 ns 0.97
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1350.47 ns 26.23 ns 28.99 ns 0.90
immediate_just(1,2)+first()+subscribe 2058.15 ns 23.76 ns 22.82 ns 1.04
immediate_just(1,2)+last()+subscribe 1785.74 ns 24.69 ns 24.06 ns 1.03
immediate_just+take_last(1)+subscribe 1998.88 ns 69.49 ns 69.59 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 1309.08 ns 26.52 ns 27.44 ns 0.97

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 483.09 ns 6.79 ns 6.17 ns 1.10
current_thread scheduler create worker + schedule 647.13 ns 14.12 ns 14.08 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1347.68 ns 102.66 ns 105.75 ns 0.97

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1316.37 ns 24.36 ns 24.37 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1421.16 ns 26.51 ns 26.82 ns 0.99
immediate_just+flat_map(immediate_just(v*2))+subscribe 3479.46 ns 210.42 ns 206.57 ns 1.02
immediate_just+buffer(2)+subscribe 2660.62 ns 67.96 ns 68.49 ns 0.99
immediate_just+window(2)+subscribe + subscsribe inner 4023.91 ns 1301.98 ns 1318.74 ns 0.99

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1635.30 ns 23.12 ns 23.12 ns 1.00
immediate_just+take_while(true)+subscribe 1320.51 ns 24.05 ns 24.36 ns 0.99

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3499.65 ns 11.10 ns 11.10 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 5136.79 ns 223.68 ns 222.77 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 5439.09 ns 222.57 ns 208.87 ns 1.07
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 203.82 ns 193.87 ns 1.05
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 5409.19 ns 941.75 ns 936.70 ns 1.01
immediate_just(1) + zip(immediate_just(2)) + subscribe 3553.25 ns 518.32 ns 506.33 ns 1.02

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.53 ns 20.65 ns 20.35 ns 1.02
subscribe 100 observers to publish_subject 259300.00 ns 29564.10 ns 30703.03 ns 0.96
100 on_next to 100 observers to publish_subject 54765.00 ns 38822.22 ns 38783.33 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1900.00 ns 105.05 ns 101.40 ns 1.04
basic sample with immediate scheduler 1882.97 ns 72.45 ns 74.57 ns 0.97

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1452.52 ns 24.66 ns 24.97 ns 0.99

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2185.08 ns 348.74 ns 350.21 ns 1.00
create(on_error())+retry(1)+subscribe 1159.57 ns 139.99 ns 143.31 ns 0.98

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.66%. Comparing base (75d1a47) to head (71c8268).
Report is 1 commits behind head on v2.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2     #638   +/-   ##
=======================================
  Coverage   95.65%   95.66%           
=======================================
  Files          98       98           
  Lines        1865     1867    +2     
=======================================
+ Hits         1784     1786    +2     
  Misses         81       81           

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

Copy link

sonarqubecloud bot commented Sep 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@victimsnino victimsnino merged commit 29e1587 into v2 Sep 5, 2024
36 of 37 checks passed
@victimsnino victimsnino deleted the fix_order_of_calls branch September 5, 2024 14:45
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