victimsnino / ReactivePlusPlus

Implementation of async observable/observer (Reactive Programming) in C++ with care about performance and templates in mind in ReactiveX approach
https://victimsnino.github.io/ReactivePlusPlus/v2/docs/html/index.html
Boost Software License 1.0
246 stars 28 forks source link

Try to stabilize disposables logic #673

Closed victimsnino closed 1 week ago

victimsnino commented 2 weeks ago

Stabilize disposables logic: #666

Summary by CodeRabbit

Summary by CodeRabbit

coderabbitai[bot] commented 2 weeks ago
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough ## Walkthrough This pull request introduces significant modifications across multiple files in the ReactivePlusPlus library, primarily focusing on the restructuring of classes and methods related to disposables. Key changes include renaming various state classes to disposable classes, simplifying method signatures, and enhancing the management of disposables within the operators. The modifications aim to streamline the reference counting and disposal logic, ensuring a more intuitive handling of resources throughout the library. ## Changes | File Path | Change Summary | |-----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `src/rpp/rpp/disposables/refcount_disposable.hpp` | Removed `Mode` enum; updated `add_ref` method signature to have no parameters; simplified inner wrapper creation logic. | | `src/rpp/rpp/observables/details/chain_strategy.hpp` | Added static assertion in `subscribe` method to enforce `operator_subscribe` constraint for `TStrategy`. | | `src/rpp/rpp/operators/combine_latest.hpp` | Renamed `combine_latest_state` to `combine_latest_disposable`; updated inheritance and method calls to reflect the new disposable structure. | | `src/rpp/rpp/operators/concat.hpp` | Renamed `concat_state_t` to `concat_disposable`; updated inheritance and method references to use the new disposable structure. | | `src/rpp/rpp/operators/debounce.hpp` | Renamed `debounce_state` to `debounce_disposable`; updated structure to include disposables container and adjusted method signatures accordingly. | | `src/rpp/rpp/operators/delay.hpp` | Renamed `delay_state` to `delay_disposable`; updated structure to manage disposables; adjusted method implementations. | | `src/rpp/rpp/operators/details/combining_strategy.hpp` | Renamed `combining_state` to `combining_disposable`; updated inheritance and method references to use the new disposable structure. | | `src/rpp/rpp/operators/merge.hpp` | Renamed `merge_state` to `merge_disposable`; updated class structure and method calls to reflect the new disposable management. | | `src/rpp/rpp/operators/on_error_resume_next.hpp` | Introduced `on_error_resume_next_disposable` structure; updated observer strategy to utilize the new disposable structure. | | `src/rpp/rpp/operators/retry.hpp` | Updated `retry_state_t` to inherit from `rpp::composite_disposable`; simplified disposable management logic in methods. | | `src/rpp/rpp/operators/retry_when.hpp` | Updated `retry_when_state` to inherit from `rpp::composite_disposable`; simplified logic for managing disposables. | | `src/rpp/rpp/operators/take_until.hpp` | Renamed `take_until_state` to `take_until_disposable`; updated method implementations to reflect the new disposable structure. | | `src/rpp/rpp/operators/with_latest_from.hpp` | Renamed `with_latest_from_state` to `with_latest_from_disposable`; updated method calls and structure to use disposable management. | | `src/rpp/rpp/operators/zip.hpp` | Renamed `zip_state` to `zip_disposable`; updated class structure and method calls to reflect the new disposable management. | | `src/rpp/rpp/sources/concat.hpp` | Updated `concat_state_t` to inherit from `rpp::composite_disposable`; modified methods to utilize new disposable management logic. | | `src/tests/utils/disposable_observable.hpp` | Renamed and consolidated test cases regarding disposal timing; retained assertions to ensure correct disposal behavior. | | `cmake/dependencies.cmake` | Updated version tags for `trompeloeil` and `nanobench` libraries in the dependency fetching logic. | | `conanfile.py` | Updated `trompeloeil` dependency version from `47` to `48` when tests are enabled. | | `src/benchmarks/benchmarks.cpp` | Added `immediate_just` function in `rxcpp` namespace; minor adjustments to the main function for benchmarking. | | `.github/workflows/ci v2.yml` | Added installation step for `python3-jinja2`, updated timeout settings for jobs in the CI workflow. | ## Possibly related PRs - **#640**: Related to changes in disposable management, specifically in the `concat_state_t` class. - **#661**: Enhances disposal management in various classes, complementing the changes made in this PR regarding `refcount_disposable`. > > 🐇 In the land of code, where bunnies hop, > Changes abound, and we never stop. > Disposables dance, in a streamlined way, > Readability blooms, come join the play! > With each little tweak, our code shines bright, > Hooray for the changes, all feels just right! > 🐇

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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 2 weeks ago

BENCHMARK RESULTS (AUTOGENERATED)

## ci-ubuntu-gcc
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 300.97 ns | 1.86 ns| 1.91 ns | 0.98 Subscribe empty callbacks to empty observable via pipe operator | 302.13 ns | 1.85 ns| 1.85 ns | 1.00
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 692.72 ns | 0.31 ns| 0.31 ns | 1.00 from array of 1 - create + subscribe + current_thread | 1029.04 ns | 3.42 ns| 3.71 ns | 0.92 concat_as_source of just(1 immediate) create + subscribe | 2215.90 ns | 94.95 ns| 143.09 ns | 0.66 defer from array of 1 - defer + create + subscribe + immediate | 731.78 ns | 0.32 ns| 0.31 ns | 1.04 interval - interval + take(3) + subscribe + immediate | 2183.02 ns | 59.19 ns| 59.19 ns | 1.00 interval - interval + take(3) + subscribe + current_thread | 3008.75 ns | 32.43 ns| 32.40 ns | 1.00 from array of 1 - create + as_blocking + subscribe + new_thread | 30715.03 ns | 28893.20 ns| 35689.73 ns | 0.81 from array of 1000 - create + as_blocking + subscribe + new_thread | 48122.12 ns | 53439.47 ns| 48367.14 ns | 1.10 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 3514.38 ns | 114.04 ns| 213.15 ns | 0.54
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 1084.75 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+filter(true)+subscribe | 834.21 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+skip(1)+subscribe | 1001.38 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 886.83 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+first()+subscribe | 1233.65 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+last()+subscribe | 902.41 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+take_last(1)+subscribe | 1115.41 ns | 18.21 ns| 17.90 ns | 1.02 immediate_just(1,2,3)+element_at(1)+subscribe | 831.48 ns | 0.31 ns| 0.31 ns | 1.00
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 267.20 ns | 1.54 ns| 0.46 ns | 3.33 current_thread scheduler create worker + schedule | 388.07 ns | 4.64 ns| 4.32 ns | 1.07 current_thread scheduler create worker + schedule + recursive schedule | 812.46 ns | 60.61 ns| 62.03 ns | 0.98
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 874.49 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+scan(10, std::plus)+subscribe | 912.34 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+flat_map(immediate_just(v*2))+subscribe | 2322.34 ns | 131.31 ns| 181.15 ns | 0.72 immediate_just+buffer(2)+subscribe | 1536.69 ns | 13.90 ns| 13.58 ns | 1.02 immediate_just+window(2)+subscribe + subscsribe inner | 2381.94 ns | 1086.36 ns| 1296.56 ns | 0.84
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 848.86 ns | -| - | 0.00 immediate_just+take_while(true)+subscribe | 854.79 ns | 0.31 ns| 0.31 ns | 1.00
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 1975.66 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 | 3391.23 ns | 147.75 ns| 235.49 ns | 0.63 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 3619.37 ns | 150.88 ns| 174.91 ns | 0.86 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 129.34 ns| 182.39 ns | 0.71 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 3575.85 ns | 919.82 ns| 1396.24 ns | 0.66 immediate_just(1) + zip(immediate_just(2)) + subscribe | 2157.75 ns | 256.98 ns| 224.29 ns | 1.15
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 34.56 ns | 14.66 ns| 14.68 ns | 1.00 subscribe 100 observers to publish_subject | 197323.40 ns | 15209.79 ns| 16221.46 ns | 0.94 100 on_next to 100 observers to publish_subject | 27798.49 ns | 17238.52 ns| 17423.90 ns | 0.99
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 1405.64 ns | 12.97 ns| 12.96 ns | 1.00 basic sample with immediate scheduler | 1408.12 ns | 5.55 ns| 5.24 ns | 1.06
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 953.45 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 | 2009.17 ns | 993.90 ns| 900.02 ns | 1.10 create(on_error())+retry(1)+subscribe | 587.43 ns | 98.56 ns| 120.89 ns | 0.82
## ci-macos
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 1200.73 ns | 0.54 ns| 0.47 ns | 1.15 Subscribe empty callbacks to empty observable via pipe operator | 1268.79 ns | 0.57 ns| 0.47 ns | 1.23
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 2243.56 ns | 0.28 ns| 0.23 ns | 1.19 from array of 1 - create + subscribe + current_thread | 2949.42 ns | 38.71 ns| 31.94 ns | 1.21 concat_as_source of just(1 immediate) create + subscribe | 7560.51 ns | 417.12 ns| 412.55 ns | 1.01 defer from array of 1 - defer + create + subscribe + immediate | 2749.75 ns | 0.31 ns| 0.23 ns | 1.35 interval - interval + take(3) + subscribe + immediate | 6616.61 ns | 163.71 ns| 110.60 ns | 1.48 interval - interval + take(3) + subscribe + current_thread | 7484.31 ns | 133.13 ns| 94.64 ns | 1.41 from array of 1 - create + as_blocking + subscribe + new_thread | 103975.90 ns | 102889.78 ns| 79258.86 ns | 1.30 from array of 1000 - create + as_blocking + subscribe + new_thread | 118261.67 ns | 110464.89 ns| 89848.46 ns | 1.23 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 11548.92 ns | 522.02 ns| 584.02 ns | 0.89
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 2876.04 ns | 0.23 ns| 0.22 ns | 1.05 immediate_just+filter(true)+subscribe | 2254.13 ns | 0.24 ns| 0.22 ns | 1.08 immediate_just(1,2)+skip(1)+subscribe | 2746.94 ns | 0.23 ns| 0.22 ns | 1.05 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 2103.11 ns | 0.47 ns| 0.45 ns | 1.05 immediate_just(1,2)+first()+subscribe | 3797.82 ns | 0.26 ns| 0.22 ns | 1.16 immediate_just(1,2)+last()+subscribe | 3085.35 ns | 0.30 ns| 0.22 ns | 1.34 immediate_just+take_last(1)+subscribe | 3488.73 ns | 0.26 ns| 0.22 ns | 1.16 immediate_just(1,2,3)+element_at(1)+subscribe | 2119.55 ns | 0.23 ns| 0.22 ns | 1.05
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 1167.21 ns | 1.28 ns| 0.46 ns | 2.81 current_thread scheduler create worker + schedule | 1288.15 ns | 39.54 ns| 32.90 ns | 1.20 current_thread scheduler create worker + schedule + recursive schedule | 2149.28 ns | 214.38 ns| 193.93 ns | 1.11
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 2453.57 ns | 4.54 ns| 4.01 ns | 1.13 immediate_just+scan(10, std::plus)+subscribe | 2908.33 ns | 0.57 ns| 0.45 ns | 1.29 immediate_just+flat_map(immediate_just(v*2))+subscribe | 6827.22 ns | 425.27 ns| 474.56 ns | 0.90 immediate_just+buffer(2)+subscribe | 2483.81 ns | 73.37 ns| 61.98 ns | 1.18 immediate_just+window(2)+subscribe + subscsribe inner | 5491.50 ns | 2356.71 ns| 2275.83 ns | 1.04
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 2332.24 ns | -| - | 0.00 immediate_just+take_while(true)+subscribe | 2266.48 ns | 0.23 ns| 0.22 ns | 1.05
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 4913.54 ns | 5.13 ns| 4.90 ns | 1.05
### Combining Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe | 8669.72 ns | 447.38 ns| 560.05 ns | 0.80 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 9231.66 ns | 454.04 ns| 475.33 ns | 0.96 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 455.68 ns| 549.60 ns | 0.83 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 7887.61 ns | 1876.96 ns| 1862.26 ns | 1.01 immediate_just(1) + zip(immediate_just(2)) + subscribe | 5478.57 ns | 868.46 ns| 850.41 ns | 1.02
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 78.99 ns | 51.26 ns| 47.62 ns | 1.08 subscribe 100 observers to publish_subject | 516060.00 ns | 44730.95 ns| 38557.89 ns | 1.16 100 on_next to 100 observers to publish_subject | 61647.79 ns | 25605.17 ns| 21629.23 ns | 1.18
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 3198.20 ns | 79.68 ns| 72.82 ns | 1.09 basic sample with immediate scheduler | 3415.79 ns | 20.27 ns| 18.83 ns | 1.08
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 2373.53 ns | 0.23 ns| 0.23 ns | 1.02
### Error Handling Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe | 6792.05 ns | 4202.30 ns| 3777.43 ns | 1.11 create(on_error())+retry(1)+subscribe | 1850.55 ns | 288.55 ns| 366.79 ns | 0.79
## ci-ubuntu-clang
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 269.65 ns | 0.64 ns| 0.63 ns | 1.02 Subscribe empty callbacks to empty observable via pipe operator | 269.84 ns | 0.63 ns| 0.63 ns | 1.00
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 566.41 ns | 0.31 ns| 0.31 ns | 0.99 from array of 1 - create + subscribe + current_thread | 799.55 ns | 4.01 ns| 4.63 ns | 0.87 concat_as_source of just(1 immediate) create + subscribe | 2379.43 ns | 128.65 ns| 175.41 ns | 0.73 defer from array of 1 - defer + create + subscribe + immediate | 865.25 ns | 0.31 ns| 0.31 ns | 1.00 interval - interval + take(3) + subscribe + immediate | 2527.79 ns | 59.63 ns| 58.26 ns | 1.02 interval - interval + take(3) + subscribe + current_thread | 3195.66 ns | 32.26 ns| 30.88 ns | 1.04 from array of 1 - create + as_blocking + subscribe + new_thread | 28923.81 ns | 28605.48 ns| 27763.87 ns | 1.03 from array of 1000 - create + as_blocking + subscribe + new_thread | 37753.72 ns | 39900.77 ns| 36403.53 ns | 1.10 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 3737.18 ns | 147.77 ns| 296.56 ns | 0.50
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 1220.39 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+filter(true)+subscribe | 865.66 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+skip(1)+subscribe | 1157.95 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 913.19 ns | 0.62 ns| 0.31 ns | 2.00 immediate_just(1,2)+first()+subscribe | 1399.05 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+last()+subscribe | 1039.57 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+take_last(1)+subscribe | 1229.46 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2,3)+element_at(1)+subscribe | 881.71 ns | 0.31 ns| 0.31 ns | 1.00
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 282.92 ns | 1.54 ns| 1.54 ns | 1.00 current_thread scheduler create worker + schedule | 419.27 ns | 4.01 ns| 4.32 ns | 0.93 current_thread scheduler create worker + schedule + recursive schedule | 872.14 ns | 55.89 ns| 55.43 ns | 1.01
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 867.71 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+scan(10, std::plus)+subscribe | 995.98 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+flat_map(immediate_just(v*2))+subscribe | 2260.12 ns | 140.83 ns| 229.22 ns | 0.61 immediate_just+buffer(2)+subscribe | 1574.87 ns | 13.59 ns| 14.20 ns | 0.96 immediate_just+window(2)+subscribe + subscsribe inner | 2467.75 ns | 902.83 ns| 909.27 ns | 0.99
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 876.24 ns | -| - | 0.00 immediate_just+take_while(true)+subscribe | 869.17 ns | 0.31 ns| 0.31 ns | 1.00
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 2022.87 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 | 3266.78 ns | 153.81 ns| 281.66 ns | 0.55 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 3718.39 ns | 137.49 ns| 210.18 ns | 0.65 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 142.53 ns| 194.38 ns | 0.73 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 3382.70 ns | 829.42 ns| 833.25 ns | 1.00 immediate_just(1) + zip(immediate_just(2)) + subscribe | 2228.96 ns | 199.82 ns| 192.28 ns | 1.04
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 52.54 ns | 17.73 ns| 17.43 ns | 1.02 subscribe 100 observers to publish_subject | 209533.60 ns | 16012.59 ns| 16105.46 ns | 0.99 100 on_next to 100 observers to publish_subject | 46933.72 ns | 23590.61 ns| 23437.80 ns | 1.01
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 1312.77 ns | 11.42 ns| 12.34 ns | 0.93 basic sample with immediate scheduler | 1297.85 ns | 5.86 ns| 5.86 ns | 1.00
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 1043.68 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 | 2220.91 ns | 1156.87 ns| 995.35 ns | 1.16 create(on_error())+retry(1)+subscribe | 679.65 ns | 140.22 ns| 156.25 ns | 0.90
## ci-windows
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 574.19 ns | 2.16 ns| 2.16 ns | 1.00 Subscribe empty callbacks to empty observable via pipe operator | 588.63 ns | 2.16 ns| 2.16 ns | 1.00
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 1187.84 ns | 5.24 ns| 5.24 ns | 1.00 from array of 1 - create + subscribe + current_thread | 1447.18 ns | 15.44 ns| 15.43 ns | 1.00 concat_as_source of just(1 immediate) create + subscribe | 3676.70 ns | 174.97 ns| 239.25 ns | 0.73 defer from array of 1 - defer + create + subscribe + immediate | 1190.39 ns | 5.24 ns| 4.93 ns | 1.06 interval - interval + take(3) + subscribe + immediate | 3584.56 ns | 140.63 ns| 138.82 ns | 1.01 interval - interval + take(3) + subscribe + current_thread | 3464.19 ns | 59.80 ns| 59.23 ns | 1.01 from array of 1 - create + as_blocking + subscribe + new_thread | 120037.50 ns | 115322.22 ns| 115570.00 ns | 1.00 from array of 1000 - create + as_blocking + subscribe + new_thread | 130225.00 ns | 131655.56 ns| 132362.50 ns | 0.99 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 5298.45 ns | 211.58 ns| 306.04 ns | 0.69
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 1803.19 ns | 19.73 ns| 19.43 ns | 1.02 immediate_just+filter(true)+subscribe | 1322.33 ns | 18.81 ns| 18.50 ns | 1.02 immediate_just(1,2)+skip(1)+subscribe | 1725.49 ns | 18.52 ns| 17.90 ns | 1.03 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 1636.16 ns | 23.44 ns| 20.82 ns | 1.13 immediate_just(1,2)+first()+subscribe | 2045.36 ns | 17.29 ns| 18.21 ns | 0.95 immediate_just(1,2)+last()+subscribe | 1768.50 ns | 18.52 ns| 19.12 ns | 0.97 immediate_just+take_last(1)+subscribe | 2000.88 ns | 65.23 ns| 63.86 ns | 1.02 immediate_just(1,2,3)+element_at(1)+subscribe | 1336.92 ns | 21.90 ns| 20.97 ns | 1.04
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 478.86 ns | 4.32 ns| 4.32 ns | 1.00 current_thread scheduler create worker + schedule | 661.26 ns | 11.43 ns| 11.40 ns | 1.00 current_thread scheduler create worker + schedule + recursive schedule | 1093.51 ns | 99.02 ns| 101.03 ns | 0.98
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 1316.92 ns | 18.82 ns| 18.82 ns | 1.00 immediate_just+scan(10, std::plus)+subscribe | 1534.33 ns | 21.69 ns| 20.98 ns | 1.03 immediate_just+flat_map(immediate_just(v*2))+subscribe | 3467.99 ns | 190.83 ns| 271.40 ns | 0.70 immediate_just+buffer(2)+subscribe | 2646.06 ns | 65.87 ns| 63.64 ns | 1.03 immediate_just+window(2)+subscribe + subscsribe inner | 3991.35 ns | 1297.83 ns| 1322.34 ns | 0.98
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 1605.24 ns | 17.58 ns| 17.58 ns | 1.00 immediate_just+take_while(true)+subscribe | 1331.26 ns | 18.82 ns| 18.50 ns | 1.02
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 3161.61 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 | 5057.64 ns | 193.07 ns| 296.88 ns | 0.65 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 5359.69 ns | 186.52 ns| 268.90 ns | 0.69 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 190.78 ns| 302.35 ns | 0.63 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 5354.93 ns | 962.92 ns| 959.20 ns | 1.00 immediate_just(1) + zip(immediate_just(2)) + subscribe | 3548.10 ns | 511.38 ns| 561.49 ns | 0.91
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 36.68 ns | 19.58 ns| 20.69 ns | 0.95 subscribe 100 observers to publish_subject | 262850.00 ns | 26452.27 ns| 28441.67 ns | 0.93 100 on_next to 100 observers to publish_subject | 54800.00 ns | 32606.45 ns| 35741.38 ns | 0.91
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 1881.10 ns | 95.68 ns| 96.80 ns | 0.99 basic sample with immediate scheduler | 2269.02 ns | 68.56 ns| 68.74 ns | 1.00
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 1464.63 ns | 19.42 ns| 19.13 ns | 1.02
### Error Handling Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe | 2164.99 ns | 358.46 ns| 241.08 ns | 1.49 create(on_error())+retry(1)+subscribe | 1702.92 ns | 145.53 ns| 196.97 ns | 0.74
codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 98.14815% with 3 lines in your changes missing coverage. Please review.

Project coverage is 98.47%. Comparing base (5c6020e) to head (be3d80d). Report is 1 commits behind head on v2.

Files with missing lines Patch % Lines
src/rpp/rpp/operators/debounce.hpp 94.44% 1 Missing :warning:
src/rpp/rpp/operators/delay.hpp 96.77% 1 Missing :warning:
src/rpp/rpp/operators/retry_when.hpp 88.88% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## v2 #673 +/- ## ========================================== - Coverage 98.48% 98.47% -0.01% ========================================== Files 155 155 Lines 9678 9695 +17 ========================================== + Hits 9531 9547 +16 - Misses 147 148 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

victimsnino commented 1 week ago

Old:

BENCHMARK RESULTS (AUTOGENERATED)

## ci-ubuntu-gcc
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 303.52 ns | 1.54 ns| 1.88 ns | 0.82 Subscribe empty callbacks to empty observable via pipe operator | 302.85 ns | 1.54 ns| 1.86 ns | 0.83
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 683.08 ns | 0.31 ns| 0.31 ns | 1.00 from array of 1 - create + subscribe + current_thread | 1025.94 ns | 3.71 ns| 3.70 ns | 1.00 concat_as_source of just(1 immediate) create + subscribe | 2259.51 ns | 99.82 ns| 138.50 ns | 0.72 defer from array of 1 - defer + create + subscribe + immediate | 723.84 ns | 0.31 ns| 0.31 ns | 1.00 interval - interval + take(3) + subscribe + immediate | 2124.17 ns | 59.24 ns| 59.23 ns | 1.00 interval - interval + take(3) + subscribe + current_thread | 2962.57 ns | 32.40 ns| 32.40 ns | 1.00 from array of 1 - create + as_blocking + subscribe + new_thread | 30750.79 ns | 27850.71 ns| 28596.20 ns | 0.97 from array of 1000 - create + as_blocking + subscribe + new_thread | 40687.11 ns | 49576.10 ns| 51823.36 ns | 0.96 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 3480.72 ns | 120.12 ns| 214.73 ns | 0.56
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 1081.79 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+filter(true)+subscribe | 841.13 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+skip(1)+subscribe | 976.70 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 868.78 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+first()+subscribe | 1247.09 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+last()+subscribe | 902.54 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+take_last(1)+subscribe | 1097.30 ns | 18.22 ns| 18.36 ns | 0.99 immediate_just(1,2,3)+element_at(1)+subscribe | 889.99 ns | 0.31 ns| 0.31 ns | 1.00
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 282.52 ns | 0.62 ns| 1.54 ns | 0.40 current_thread scheduler create worker + schedule | 366.98 ns | 4.94 ns| 4.32 ns | 1.14 current_thread scheduler create worker + schedule + recursive schedule | 846.32 ns | 63.37 ns| 61.12 ns | 1.04
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 862.55 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+scan(10, std::plus)+subscribe | 887.50 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+flat_map(immediate_just(v*2))+subscribe | 2343.57 ns | 160.40 ns| 185.16 ns | 0.87 immediate_just+buffer(2)+subscribe | 1535.31 ns | 13.90 ns| 13.90 ns | 1.00 immediate_just+window(2)+subscribe + subscsribe inner | 2338.17 ns | 1070.01 ns| 1328.14 ns | 0.81
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 843.36 ns | -| - | 0.00 immediate_just+take_while(true)+subscribe | 835.30 ns | 0.31 ns| 0.31 ns | 1.00
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 1992.53 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 | 3578.84 ns | 167.91 ns| 231.96 ns | 0.72 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 3681.27 ns | 157.75 ns| 177.79 ns | 0.89 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 145.12 ns| 177.69 ns | 0.82 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 3590.01 ns | 974.87 ns| 1270.43 ns | 0.77 immediate_just(1) + zip(immediate_just(2)) + subscribe | 2081.04 ns | 202.10 ns| 226.46 ns | 0.89
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 34.47 ns | 35.44 ns| 14.67 ns | 2.42 subscribe 100 observers to publish_subject | 200621.67 ns | 15141.80 ns| 16076.72 ns | 0.94 100 on_next to 100 observers to publish_subject | 26925.80 ns | 18961.18 ns| 17139.95 ns | 1.11
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 1386.95 ns | 13.28 ns| 12.97 ns | 1.02 basic sample with immediate scheduler | 1445.90 ns | 5.55 ns| 5.24 ns | 1.06
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 901.86 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 | 2037.02 ns | 1001.08 ns| 888.98 ns | 1.13 create(on_error())+retry(1)+subscribe | 584.91 ns | 102.91 ns| 121.57 ns | 0.85
## ci-macos
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 1314.40 ns | 0.64 ns| 0.54 ns | 1.18 Subscribe empty callbacks to empty observable via pipe operator | 1341.85 ns | 0.63 ns| 0.64 ns | 0.99
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 2658.21 ns | 0.32 ns| 0.35 ns | 0.91 from array of 1 - create + subscribe + current_thread | 3352.37 ns | 54.79 ns| 53.44 ns | 1.03 concat_as_source of just(1 immediate) create + subscribe | 7489.20 ns | 628.86 ns| 656.75 ns | 0.96 defer from array of 1 - defer + create + subscribe + immediate | 3794.29 ns | 0.60 ns| 1.58 ns | 0.38 interval - interval + take(3) + subscribe + immediate | 9019.52 ns | 154.25 ns| 226.13 ns | 0.68 interval - interval + take(3) + subscribe + current_thread | 10482.49 ns | 157.74 ns| 169.50 ns | 0.93 from array of 1 - create + as_blocking + subscribe + new_thread | 132098.12 ns | 116990.10 ns| 118889.20 ns | 0.98 from array of 1000 - create + as_blocking + subscribe + new_thread | 141182.67 ns | 131117.50 ns| 136567.12 ns | 0.96 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 11368.61 ns | 487.69 ns| 1482.27 ns | 0.33
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 3913.31 ns | 0.32 ns| 0.23 ns | 1.35 immediate_just+filter(true)+subscribe | 2828.68 ns | 0.31 ns| 0.24 ns | 1.34 immediate_just(1,2)+skip(1)+subscribe | 4256.00 ns | 0.34 ns| 0.29 ns | 1.16 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 2792.47 ns | 0.63 ns| 0.70 ns | 0.91 immediate_just(1,2)+first()+subscribe | 4320.61 ns | 0.32 ns| 0.25 ns | 1.25 immediate_just(1,2)+last()+subscribe | 4524.14 ns | 0.32 ns| 0.28 ns | 1.15 immediate_just+take_last(1)+subscribe | 4034.72 ns | 0.33 ns| 0.23 ns | 1.40 immediate_just(1,2,3)+element_at(1)+subscribe | 2874.88 ns | 0.32 ns| 0.35 ns | 0.91
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 1673.53 ns | 1.85 ns| 0.77 ns | 2.39 current_thread scheduler create worker + schedule | 2233.54 ns | 55.63 ns| 51.31 ns | 1.08 current_thread scheduler create worker + schedule + recursive schedule | 3762.57 ns | 314.10 ns| 298.16 ns | 1.05
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 4210.86 ns | 8.56 ns| 4.23 ns | 2.02 immediate_just+scan(10, std::plus)+subscribe | 4298.68 ns | 0.77 ns| 0.47 ns | 1.66 immediate_just+flat_map(immediate_just(v*2))+subscribe | 7814.70 ns | 714.69 ns| 491.69 ns | 1.45 immediate_just+buffer(2)+subscribe | 3372.76 ns | 86.25 ns| 66.25 ns | 1.30 immediate_just+window(2)+subscribe + subscsribe inner | 7319.29 ns | 3216.23 ns| 2579.62 ns | 1.25
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 2864.03 ns | -| - | 0.00 immediate_just+take_while(true)+subscribe | 3864.12 ns | 0.66 ns| 0.35 ns | 1.90
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 6734.64 ns | 6.91 ns| 6.72 ns | 1.03
### Combining Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe | 14643.61 ns | 773.73 ns| 833.66 ns | 0.93 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 13239.05 ns | 561.42 ns| 755.08 ns | 0.74 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 869.69 ns| 724.26 ns | 1.20 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 16217.38 ns | 3192.77 ns| 2449.56 ns | 1.30 immediate_just(1) + zip(immediate_just(2)) + subscribe | 10235.87 ns | 1238.90 ns| 1298.31 ns | 0.95
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 104.14 ns | 66.44 ns| 56.98 ns | 1.17 subscribe 100 observers to publish_subject | 478443.50 ns | 55117.74 ns| 46422.57 ns | 1.19 100 on_next to 100 observers to publish_subject | 78834.31 ns | 28668.08 ns| 28426.72 ns | 1.01
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 3749.12 ns | 90.93 ns| 72.09 ns | 1.26 basic sample with immediate scheduler | 3772.96 ns | 25.49 ns| 18.70 ns | 1.36
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 3295.66 ns | 0.32 ns| 0.31 ns | 1.01
### Error Handling Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe | 9032.49 ns | 5480.66 ns| 5622.37 ns | 0.97 create(on_error())+retry(1)+subscribe | 2473.49 ns | 381.06 ns| 430.25 ns | 0.89
## ci-ubuntu-clang
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 271.14 ns | 0.63 ns| 0.63 ns | 1.00 Subscribe empty callbacks to empty observable via pipe operator | 271.47 ns | 0.63 ns| 0.63 ns | 1.00
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 560.29 ns | 0.31 ns| 0.31 ns | 1.00 from array of 1 - create + subscribe + current_thread | 799.24 ns | 4.63 ns| 4.63 ns | 1.00 concat_as_source of just(1 immediate) create + subscribe | 2334.02 ns | 127.78 ns| 177.50 ns | 0.72 defer from array of 1 - defer + create + subscribe + immediate | 769.68 ns | 0.31 ns| 0.31 ns | 1.00 interval - interval + take(3) + subscribe + immediate | 2218.18 ns | 58.31 ns| 58.26 ns | 1.00 interval - interval + take(3) + subscribe + current_thread | 3254.24 ns | 33.83 ns| 30.88 ns | 1.10 from array of 1 - create + as_blocking + subscribe + new_thread | 27508.62 ns | 27291.18 ns| 28128.92 ns | 0.97 from array of 1000 - create + as_blocking + subscribe + new_thread | 39750.72 ns | 36888.53 ns| 34340.88 ns | 1.07 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 3706.16 ns | 148.99 ns| 302.02 ns | 0.49
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 1135.91 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+filter(true)+subscribe | 834.25 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+skip(1)+subscribe | 1076.40 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 878.40 ns | 0.62 ns| 0.31 ns | 2.00 immediate_just(1,2)+first()+subscribe | 1367.55 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2)+last()+subscribe | 999.92 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+take_last(1)+subscribe | 1182.77 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just(1,2,3)+element_at(1)+subscribe | 875.73 ns | 0.31 ns| 0.31 ns | 1.00
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 280.75 ns | 1.54 ns| 1.54 ns | 1.00 current_thread scheduler create worker + schedule | 397.38 ns | 4.32 ns| 4.32 ns | 1.00 current_thread scheduler create worker + schedule + recursive schedule | 859.40 ns | 54.84 ns| 54.85 ns | 1.00
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 862.04 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+scan(10, std::plus)+subscribe | 960.08 ns | 0.31 ns| 0.31 ns | 1.00 immediate_just+flat_map(immediate_just(v*2))+subscribe | 2232.84 ns | 135.15 ns| 224.25 ns | 0.60 immediate_just+buffer(2)+subscribe | 1530.87 ns | 13.58 ns| 14.20 ns | 0.96 immediate_just+window(2)+subscribe + subscsribe inner | 2429.41 ns | 905.35 ns| 905.82 ns | 1.00
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 829.30 ns | -| - | 0.00 immediate_just+take_while(true)+subscribe | 846.09 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.70 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 | 3233.81 ns | 154.91 ns| 281.39 ns | 0.55 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 3707.60 ns | 138.74 ns| 209.42 ns | 0.66 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 141.98 ns| 196.84 ns | 0.72 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 3371.82 ns | 834.14 ns| 833.29 ns | 1.00 immediate_just(1) + zip(immediate_just(2)) + subscribe | 2192.81 ns | 195.92 ns| 195.51 ns | 1.00
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 52.48 ns | 17.55 ns| 17.46 ns | 1.01 subscribe 100 observers to publish_subject | 202295.40 ns | 15971.67 ns| 17200.45 ns | 0.93 100 on_next to 100 observers to publish_subject | 38125.65 ns | 23514.96 ns| 23464.63 ns | 1.00
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 1283.23 ns | 12.06 ns| 12.36 ns | 0.98 basic sample with immediate scheduler | 1302.11 ns | 5.86 ns| 5.86 ns | 1.00
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 1034.27 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 | 2160.57 ns | 1162.19 ns| 987.19 ns | 1.18 create(on_error())+retry(1)+subscribe | 651.94 ns | 140.15 ns| 156.09 ns | 0.90
## ci-windows
### General name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- Subscribe empty callbacks to empty observable | 613.86 ns | 2.16 ns| 2.16 ns | 1.00 Subscribe empty callbacks to empty observable via pipe operator | 622.86 ns | 2.16 ns| 2.16 ns | 1.00
### Sources name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- from array of 1 - create + subscribe + immediate | 1209.60 ns | 5.55 ns| 5.24 ns | 1.06 from array of 1 - create + subscribe + current_thread | 1486.79 ns | 15.45 ns| 15.49 ns | 1.00 concat_as_source of just(1 immediate) create + subscribe | 3873.58 ns | 201.44 ns| 239.73 ns | 0.84 defer from array of 1 - defer + create + subscribe + immediate | 1252.93 ns | 5.55 ns| 4.94 ns | 1.12 interval - interval + take(3) + subscribe + immediate | 3312.50 ns | 139.89 ns| 139.91 ns | 1.00 interval - interval + take(3) + subscribe + current_thread | 3554.07 ns | 59.51 ns| 60.60 ns | 0.98 from array of 1 - create + as_blocking + subscribe + new_thread | 126466.67 ns | 113022.22 ns| 117860.00 ns | 0.96 from array of 1000 - create + as_blocking + subscribe + new_thread | 136785.71 ns | 138275.00 ns| 137350.00 ns | 1.01 concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe | 5510.66 ns | 260.20 ns| 312.90 ns | 0.83
### Filtering Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take(1)+subscribe | 1896.42 ns | 19.44 ns| 19.43 ns | 1.00 immediate_just+filter(true)+subscribe | 1375.37 ns | 18.51 ns| 18.50 ns | 1.00 immediate_just(1,2)+skip(1)+subscribe | 1826.68 ns | 17.89 ns| 17.89 ns | 1.00 immediate_just(1,1,2)+distinct_until_changed()+subscribe | 1687.62 ns | 20.68 ns| 20.68 ns | 1.00 immediate_just(1,2)+first()+subscribe | 2097.79 ns | 18.20 ns| 18.20 ns | 1.00 immediate_just(1,2)+last()+subscribe | 1825.99 ns | 19.12 ns| 19.14 ns | 1.00 immediate_just+take_last(1)+subscribe | 2085.33 ns | 67.54 ns| 64.51 ns | 1.05 immediate_just(1,2,3)+element_at(1)+subscribe | 1383.93 ns | 20.97 ns| 20.99 ns | 1.00
### Schedulers name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate scheduler create worker + schedule | 508.57 ns | 4.32 ns| 4.32 ns | 1.00 current_thread scheduler create worker + schedule | 690.25 ns | 11.71 ns| 11.99 ns | 0.98 current_thread scheduler create worker + schedule + recursive schedule | 1402.23 ns | 104.22 ns| 99.76 ns | 1.04
### Transforming Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+map(v*2)+subscribe | 1362.47 ns | 18.82 ns| 18.81 ns | 1.00 immediate_just+scan(10, std::plus)+subscribe | 1497.23 ns | 20.98 ns| 20.96 ns | 1.00 immediate_just+flat_map(immediate_just(v*2))+subscribe | 3565.53 ns | 206.30 ns| 270.94 ns | 0.76 immediate_just+buffer(2)+subscribe | 2727.25 ns | 66.19 ns| 64.06 ns | 1.03 immediate_just+window(2)+subscribe + subscsribe inner | 4150.00 ns | 1365.99 ns| 1354.03 ns | 1.01
### Conditional Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+take_while(false)+subscribe | 1655.39 ns | 17.57 ns| 17.57 ns | 1.00 immediate_just+take_while(true)+subscribe | 1357.45 ns | 18.51 ns| 18.51 ns | 1.00
### Utility Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(1)+subscribe_on(immediate)+subscribe | 3301.57 ns | 11.10 ns| 11.11 ns | 1.00
### Combining Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe | 5249.30 ns | 218.61 ns| 294.56 ns | 0.74 immediate_just(1) + merge_with(immediate_just(2)) + subscribe | 5602.13 ns | 192.49 ns| 270.53 ns | 0.71 immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe | - | 206.54 ns| 300.66 ns | 0.69 immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe | 5577.34 ns | 979.87 ns| 961.34 ns | 1.02 immediate_just(1) + zip(immediate_just(2)) + subscribe | 3698.53 ns | 538.09 ns| 565.65 ns | 0.95
### Subjects name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- publish_subject with 1 observer - on_next | 36.65 ns | 19.94 ns| 20.65 ns | 0.97 subscribe 100 observers to publish_subject | 265400.00 ns | 30208.82 ns| 27426.83 ns | 1.10 100 on_next to 100 observers to publish_subject | 54195.00 ns | 35382.14 ns| 35760.61 ns | 0.99
### Scenarios name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- basic sample | 1973.62 ns | 96.45 ns| 96.89 ns | 1.00 basic sample with immediate scheduler | 2308.80 ns | 68.40 ns| 66.91 ns | 1.02
### Aggregating Operators name | rxcpp | rpp | prev rpp | ratio --- | --- | --- | --- | --- immediate_just+reduce(10, std::plus)+subscribe | 1511.80 ns | 19.13 ns| 19.13 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 | 2221.00 ns | 354.57 ns| 243.84 ns | 1.45 create(on_error())+retry(1)+subscribe | 1563.77 ns | 145.18 ns| 199.35 ns | 0.73
sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
50.4% Coverage on New Code
2.8% Duplication on New Code

See analysis details on SonarCloud