Skip to content

Add dynamic_connectable_observable to global include#688

Merged
victimsnino merged 1 commit into
victimsnino:v2from
CorentinBT:patch-1
Nov 22, 2024
Merged

Add dynamic_connectable_observable to global include#688
victimsnino merged 1 commit into
victimsnino:v2from
CorentinBT:patch-1

Conversation

@CorentinBT
Copy link
Copy Markdown
Contributor

@CorentinBT CorentinBT commented Nov 22, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced functionality for handling dynamic observables through a new include directive.
  • Documentation

    • Updated header file to improve access to dynamic observable features.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 22, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request involve the addition of a new include directive for dynamic_connectable_observable.hpp in the src/rpp/rpp/observables.hpp file. This update allows the observables.hpp file to access functionalities defined in dynamic_connectable_observable.hpp, enhancing its capabilities related to dynamic observables. There are no other modifications or changes to existing code or comments.

Changes

File Path Change Summary
src/rpp/rpp/observables.hpp Added include directive: #include <rpp/observables/dynamic_connectable_observable.hpp>

Possibly related PRs

  • fix dynamic connectable #686: The changes in this PR involve the addition of methods in the connectable_observable class that facilitate conversion to dynamic_connectable_observable, which directly relates to the new include directive for dynamic_connectable_observable.hpp in the main PR.

Poem

In the land of code where bunnies hop,
A new include makes our functions pop!
Dynamic observables, oh what a sight,
With connections that sparkle, oh so bright!
Hopping through headers, we cheer with glee,
For every new feature, a dance by the tree! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0736b6a and e87ef01.

📒 Files selected for processing (1)
  • src/rpp/rpp/observables.hpp (1 hunks)
🔇 Additional comments (1)
src/rpp/rpp/observables.hpp (1)

79-79: LGTM! The include addition follows the established pattern.

The new include directive maintains consistency with the existing structure and alphabetical ordering of observable-related headers.

Let's verify the necessity of this include by checking its usage in the codebase:

✅ Verification successful

The include is necessary and correctly placed

The verification confirms that dynamic_connectable_observable is actively used in the codebase:

  • It's used in the implementation of connectable_observable.hpp for type conversion
  • It has test coverage in test_connectable_observable.cpp with multiple test cases
  • The forward declarations in fwd.hpp show it's a core part of the library's type system
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check usage of dynamic_connectable_observable in the codebase
# Expected: Find references to confirm this include is needed

# Search for any usage of dynamic_connectable_observable
rg -l "dynamic_connectable_observable" --type cpp

# Search for specific type usage patterns
ast-grep --pattern 'dynamic_connectable_observable<$_>'

Length of output: 323


Script:

#!/bin/bash
# Let's check the actual usage patterns and implementation details

# Check content of forward declarations
cat src/rpp/rpp/observables/fwd.hpp

# Check the actual implementation and usage in test
rg "dynamic_connectable_observable" src/tests/rpp/test_connectable_observable.cpp -A 5

# Check if there are any direct instantiations or type aliases
rg "dynamic_connectable_observable<" --type cpp

Length of output: 10790


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>, 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 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.

@github-actions
Copy link
Copy Markdown
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 307.77 ns 1.56 ns 1.54 ns 1.01
Subscribe empty callbacks to empty observable via pipe operator 302.32 ns 1.54 ns 1.54 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 692.76 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1042.97 ns 3.43 ns 3.42 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2213.01 ns 117.93 ns 116.90 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 722.50 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2138.79 ns 59.23 ns 59.23 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3015.66 ns 32.42 ns 32.45 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 30109.47 ns 28158.78 ns 28009.81 ns 1.01
from array of 1000 - create + as_blocking + subscribe + new_thread 40690.00 ns 51724.55 ns 51102.64 ns 1.01
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3496.89 ns 132.54 ns 129.75 ns 1.02

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1063.09 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 839.56 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1009.85 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 841.31 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1311.82 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 912.17 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1128.46 ns 18.22 ns 18.22 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 897.11 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 260.94 ns 0.62 ns 0.62 ns 1.00
current_thread scheduler create worker + schedule 368.28 ns 4.63 ns 4.63 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 812.58 ns 60.52 ns 60.82 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 920.89 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 881.73 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2325.00 ns 146.98 ns 137.34 ns 1.07
immediate_just+buffer(2)+subscribe 1565.20 ns 13.89 ns 13.90 ns 1.00
immediate_just+window(2)+subscribe + subscsribe inner 2447.71 ns 1295.14 ns 1346.50 ns 0.96

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2007.64 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 3459.00 ns 164.85 ns 164.94 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3591.85 ns 158.11 ns 155.33 ns 1.02
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 142.36 ns 134.57 ns 1.06
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3590.71 ns 374.09 ns 369.18 ns 1.01
immediate_just(1) + zip(immediate_just(2)) + subscribe 2087.62 ns 212.00 ns 214.18 ns 0.99
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 3072.28 ns 226.91 ns 229.56 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.55 ns 14.67 ns 14.66 ns 1.00
subscribe 100 observers to publish_subject 198841.33 ns 15690.26 ns 16114.54 ns 0.97
100 on_next to 100 observers to publish_subject 27107.88 ns 17244.02 ns 17377.67 ns 0.99

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1348.93 ns 13.27 ns 12.96 ns 1.02
basic sample with immediate scheduler 1374.93 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 925.83 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 2040.96 ns 993.46 ns 989.78 ns 1.00
create(on_error())+retry(1)+subscribe 604.73 ns 108.85 ns 118.20 ns 0.92

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1276.47 ns 0.91 ns 0.47 ns 1.95
Subscribe empty callbacks to empty observable via pipe operator 1234.18 ns 0.89 ns 0.47 ns 1.89

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 2441.89 ns 0.30 ns 0.23 ns 1.28
from array of 1 - create + subscribe + current_thread 2747.43 ns 42.44 ns 33.87 ns 1.25
concat_as_source of just(1 immediate) create + subscribe 7104.52 ns 409.28 ns 315.43 ns 1.30
defer from array of 1 - defer + create + subscribe + immediate 2490.88 ns 0.30 ns 0.23 ns 1.29
interval - interval + take(3) + subscribe + immediate 7478.68 ns 141.59 ns 115.24 ns 1.23
interval - interval + take(3) + subscribe + current_thread 9486.94 ns 118.77 ns 97.33 ns 1.22
from array of 1 - create + as_blocking + subscribe + new_thread 102918.42 ns 103205.82 ns 90309.60 ns 1.14
from array of 1000 - create + as_blocking + subscribe + new_thread 122589.87 ns 138536.62 ns 89149.92 ns 1.55
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 10683.43 ns 477.40 ns 359.85 ns 1.33

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2900.31 ns 0.24 ns 0.23 ns 1.02
immediate_just+filter(true)+subscribe 2315.78 ns 0.24 ns 0.23 ns 1.03
immediate_just(1,2)+skip(1)+subscribe 2972.84 ns 0.26 ns 0.23 ns 1.11
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2467.10 ns 0.53 ns 0.47 ns 1.14
immediate_just(1,2)+first()+subscribe 3527.81 ns 0.26 ns 0.23 ns 1.10
immediate_just(1,2)+last()+subscribe 2624.27 ns 0.26 ns 0.23 ns 1.14
immediate_just+take_last(1)+subscribe 3073.78 ns 0.24 ns 0.23 ns 1.02
immediate_just(1,2,3)+element_at(1)+subscribe 2278.35 ns 0.26 ns 0.23 ns 1.11

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 1033.58 ns 1.20 ns 0.93 ns 1.29
current_thread scheduler create worker + schedule 1429.40 ns 40.96 ns 42.04 ns 0.97
current_thread scheduler create worker + schedule + recursive schedule 2356.23 ns 232.45 ns 198.99 ns 1.17

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2498.23 ns 4.51 ns 4.20 ns 1.08
immediate_just+scan(10, std::plus)+subscribe 2500.28 ns 0.53 ns 0.47 ns 1.13
immediate_just+flat_map(immediate_just(v*2))+subscribe 5953.74 ns 399.79 ns 370.66 ns 1.08
immediate_just+buffer(2)+subscribe 2668.93 ns 74.85 ns 65.37 ns 1.15
immediate_just+window(2)+subscribe + subscsribe inner 5446.49 ns 2483.96 ns 2361.36 ns 1.05

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2720.42 ns - - 0.00
immediate_just+take_while(true)+subscribe 2250.66 ns 0.30 ns 0.23 ns 1.26

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 4983.01 ns 5.02 ns 4.90 ns 1.02

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 9015.18 ns 480.03 ns 413.90 ns 1.16
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 10932.53 ns 514.72 ns 405.85 ns 1.27
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 599.62 ns 447.22 ns 1.34
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 10400.85 ns 1226.97 ns 924.95 ns 1.33
immediate_just(1) + zip(immediate_just(2)) + subscribe 6987.59 ns 1137.00 ns 871.42 ns 1.30
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 8471.06 ns 664.16 ns 642.71 ns 1.03

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 78.16 ns 51.59 ns 50.70 ns 1.02
subscribe 100 observers to publish_subject 356516.00 ns 42448.67 ns 40695.72 ns 1.04
100 on_next to 100 observers to publish_subject 54238.38 ns 21624.78 ns 20805.91 ns 1.04

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2833.72 ns 73.56 ns 71.76 ns 1.03
basic sample with immediate scheduler 2862.81 ns 19.75 ns 18.81 ns 1.05

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2405.37 ns 0.24 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 7164.39 ns 4243.68 ns 4045.54 ns 1.05
create(on_error())+retry(1)+subscribe 1930.85 ns 297.80 ns 282.55 ns 1.05

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 268.55 ns 1.54 ns 0.63 ns 2.43
Subscribe empty callbacks to empty observable via pipe operator 270.62 ns 1.54 ns 0.63 ns 2.43

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 569.42 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 800.99 ns 4.01 ns 4.01 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2329.13 ns 129.77 ns 128.51 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 782.10 ns 0.31 ns 0.31 ns 1.01
interval - interval + take(3) + subscribe + immediate 2207.06 ns 58.31 ns 58.26 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3181.45 ns 30.86 ns 30.93 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 30556.08 ns 28366.67 ns 27957.78 ns 1.01
from array of 1000 - create + as_blocking + subscribe + new_thread 40567.12 ns 38184.81 ns 35985.21 ns 1.06
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3673.78 ns 148.68 ns 147.61 ns 1.01

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1152.96 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 841.01 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1076.82 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 885.13 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1370.93 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 989.49 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1192.99 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 867.12 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 278.02 ns 0.63 ns 1.54 ns 0.41
current_thread scheduler create worker + schedule 390.95 ns 4.01 ns 4.01 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 844.72 ns 54.60 ns 54.97 ns 0.99

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 845.88 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 958.15 ns 0.62 ns 0.62 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2232.35 ns 139.87 ns 138.10 ns 1.01
immediate_just+buffer(2)+subscribe 1532.08 ns 13.91 ns 14.20 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2459.88 ns 911.96 ns 904.17 ns 1.01

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1973.29 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.01 ns 157.00 ns 159.75 ns 0.98
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3715.10 ns 137.35 ns 140.35 ns 0.98
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 141.88 ns 142.13 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3345.77 ns 376.74 ns 376.33 ns 1.00
immediate_just(1) + zip(immediate_just(2)) + subscribe 2201.49 ns 206.05 ns 207.07 ns 1.00
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 3289.34 ns 219.85 ns 219.76 ns 1.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 53.84 ns 17.34 ns 17.27 ns 1.00
subscribe 100 observers to publish_subject 211383.60 ns 16001.45 ns 15941.90 ns 1.00
100 on_next to 100 observers to publish_subject 42891.04 ns 23468.57 ns 20567.12 ns 1.14

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1338.40 ns 10.80 ns 10.80 ns 1.00
basic sample with immediate scheduler 1302.71 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 994.90 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 2155.77 ns 1164.22 ns 1199.38 ns 0.97
create(on_error())+retry(1)+subscribe 649.13 ns 138.58 ns 139.51 ns 0.99

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 565.10 ns 1.85 ns 1.85 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 582.76 ns 1.85 ns 1.85 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1156.16 ns 5.24 ns 5.24 ns 1.00
from array of 1 - create + subscribe + current_thread 1435.38 ns 15.44 ns 15.48 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 3707.58 ns 177.82 ns 176.67 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 1220.38 ns 5.24 ns 5.24 ns 1.00
interval - interval + take(3) + subscribe + immediate 3410.06 ns 140.70 ns 140.54 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3481.15 ns 59.73 ns 62.17 ns 0.96
from array of 1 - create + as_blocking + subscribe + new_thread 129488.89 ns 121050.00 ns 113200.00 ns 1.07
from array of 1000 - create + as_blocking + subscribe + new_thread 139085.71 ns 138722.22 ns 129444.44 ns 1.07
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 5436.82 ns 205.89 ns 203.18 ns 1.01

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1828.62 ns 19.73 ns 19.73 ns 1.00
immediate_just+filter(true)+subscribe 1382.93 ns 18.81 ns 18.81 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 2634.43 ns 19.24 ns 18.51 ns 1.04
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1345.15 ns 23.47 ns 23.44 ns 1.00
immediate_just(1,2)+first()+subscribe 2457.05 ns 17.29 ns 17.28 ns 1.00
immediate_just(1,2)+last()+subscribe 1646.26 ns 19.11 ns 18.51 ns 1.03
immediate_just+take_last(1)+subscribe 2022.37 ns 69.62 ns 68.24 ns 1.02
immediate_just(1,2,3)+element_at(1)+subscribe 1586.53 ns 21.98 ns 21.90 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 478.62 ns 4.32 ns 4.32 ns 1.00
current_thread scheduler create worker + schedule 650.83 ns 11.67 ns 11.69 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1089.56 ns 98.05 ns 98.77 ns 0.99

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1342.31 ns 18.80 ns 18.80 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1453.13 ns 20.96 ns 21.27 ns 0.99
immediate_just+flat_map(immediate_just(v*2))+subscribe 3539.63 ns 188.34 ns 188.95 ns 1.00
immediate_just+buffer(2)+subscribe 2338.95 ns 63.89 ns 62.80 ns 1.02
immediate_just+window(2)+subscribe + subscsribe inner 4123.94 ns 1335.93 ns 1308.42 ns 1.02

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1345.15 ns 17.59 ns 17.57 ns 1.00
immediate_just+take_while(true)+subscribe 1345.71 ns 18.82 ns 18.81 ns 1.00

Utility Operators

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

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 5488.24 ns 206.91 ns 204.49 ns 1.01
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 5550.26 ns 186.43 ns 187.72 ns 0.99
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 195.92 ns 207.62 ns 0.94
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 5920.20 ns 458.22 ns 443.93 ns 1.03
immediate_just(1) + zip(immediate_just(2)) + subscribe 3684.88 ns 530.77 ns 530.29 ns 1.00
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 5036.27 ns 333.61 ns 331.53 ns 1.01

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.14 ns 20.67 ns 20.66 ns 1.00
subscribe 100 observers to publish_subject 259100.00 ns 28937.14 ns 27386.84 ns 1.06
100 on_next to 100 observers to publish_subject 51945.00 ns 35681.25 ns 36107.14 ns 0.99

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1914.62 ns 96.37 ns 96.42 ns 1.00
basic sample with immediate scheduler 1922.53 ns 68.42 ns 68.21 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1467.66 ns 19.43 ns 19.42 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 2021.09 ns 358.59 ns 355.43 ns 1.01
create(on_error())+retry(1)+subscribe 1725.13 ns 136.75 ns 145.21 ns 0.94

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.61%. Comparing base (0736b6a) to head (e87ef01).
Report is 1 commits behind head on v2.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2     #688   +/-   ##
=======================================
  Coverage   98.61%   98.61%           
=======================================
  Files         156      156           
  Lines        9786     9786           
=======================================
  Hits         9650     9650           
  Misses        136      136           

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


🚨 Try these New Features:

@sonarqubecloud
Copy link
Copy Markdown

@victimsnino victimsnino merged commit b9250c8 into victimsnino:v2 Nov 22, 2024
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.

2 participants