Skip to content

coverage#678

Merged
AlexInLog merged 1 commit into
v2from
coverage
Nov 10, 2024
Merged

coverage#678
AlexInLog merged 1 commit into
v2from
coverage

Conversation

@AlexInLog

@AlexInLog AlexInLog commented Nov 10, 2024

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Tests
    • Enhanced test coverage for the immediate and queue-based schedulers by adding new subcases to validate scheduling behavior with various delay strategies.

@coderabbitai

coderabbitai Bot commented Nov 10, 2024

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The pull request introduces modifications to the test_scheduler.cpp file, enhancing test coverage for both the immediate scheduler and queue_based scheduler. New subcases are added to test the behavior of these schedulers concerning different delay strategies, specifically focusing on re-scheduling actions at specified timepoints. The structure of the test cases remains consistent, with the new subcases integrated into the existing framework to ensure comprehensive validation of scheduling functionalities.

Changes

File Change Summary
src/tests/rpp/test_scheduler.cpp - Added subcase for re-scheduling with optional_delay_from_this_timepoint in immediate scheduler.
- Added subcase for re-scheduling with optional_delay_to in immediate scheduler.
- Added subcase for re-scheduling with optional_delay_from_this_timepoint in queue_based scheduler.
- Added subcase for re-scheduling with optional_delay_to in queue_based scheduler.

Possibly related PRs

  • fix threads #648: The changes in this PR also involve modifications to the test_scheduler.cpp file, specifically adding new test cases and refining existing ones related to scheduler functionalities, which aligns with the enhancements made in the main PR regarding testing different delay strategies in schedulers.

🐇 In the land of hops and bounds,
New tests for schedulers abound.
With timepoints set and delays in play,
Our bunnies hop through night and day.
Each case a leap, each test a cheer,
Scheduling magic, let’s all draw near! 🥕


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
src/tests/rpp/test_scheduler.cpp (1)

223-237: LGTM! Consider adding a brief comment explaining the timing tolerance.

The test case is well-structured and follows the established pattern. The timing verification using diff - std::chrono::milliseconds(100) is consistent with other tests.

Consider adding a brief comment explaining why a 100ms tolerance is used in the timing verification, as this might not be immediately obvious to other developers.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9aa557c and 17ed37e.

📒 Files selected for processing (1)
  • src/tests/rpp/test_scheduler.cpp (2 hunks)
🔇 Additional comments (2)
src/tests/rpp/test_scheduler.cpp (2)

503-519: LGTM! Well-structured test for delay_from_this_timepoint.

The test case properly validates both the execution count and timing constraints. Good use of wait_till_finished() for proper cleanup.


521-537: LGTM! Good implementation of delay_to test.

The test correctly uses the initial execution time as reference point for delay_to calculation. The implementation maintains consistency with other scheduler tests while testing the unique aspects of delay_to strategy.

@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 303.93 ns 1.85 ns 1.54 ns 1.20
Subscribe empty callbacks to empty observable via pipe operator 309.60 ns 1.85 ns 1.54 ns 1.20

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 696.58 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1035.99 ns 3.42 ns 3.43 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2214.15 ns 111.86 ns 123.73 ns 0.90
defer from array of 1 - defer + create + subscribe + immediate 734.32 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2126.59 ns 59.19 ns 59.19 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3036.06 ns 32.60 ns 32.40 ns 1.01
from array of 1 - create + as_blocking + subscribe + new_thread 30450.86 ns 27712.24 ns 28243.23 ns 0.98
from array of 1000 - create + as_blocking + subscribe + new_thread 44982.89 ns 49951.58 ns 49260.17 ns 1.01
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3516.84 ns 138.53 ns 138.01 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1085.02 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 846.21 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1005.13 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 889.73 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1238.96 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 930.04 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1139.67 ns 17.90 ns 18.22 ns 0.98
immediate_just(1,2,3)+element_at(1)+subscribe 877.56 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 264.03 ns 1.54 ns 0.62 ns 2.50
current_thread scheduler create worker + schedule 390.38 ns 4.63 ns 4.63 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 839.39 ns 61.41 ns 61.11 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 852.89 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 923.68 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2354.46 ns 144.23 ns 144.35 ns 1.00
immediate_just+buffer(2)+subscribe 1549.95 ns 13.58 ns 13.90 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2429.89 ns 1367.49 ns 1372.13 ns 1.00

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 858.57 ns - - 0.00
immediate_just+take_while(true)+subscribe 891.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 2043.46 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 3401.94 ns 156.19 ns 152.08 ns 1.03
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3867.48 ns 155.08 ns 155.52 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 134.88 ns 138.82 ns 0.97
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3632.32 ns 1190.29 ns 1119.03 ns 1.06
immediate_just(1) + zip(immediate_just(2)) + subscribe 2120.74 ns 215.22 ns 221.27 ns 0.97
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 3100.04 ns 1403.74 ns 1346.05 ns 1.04

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.54 ns 14.60 ns 14.60 ns 1.00
subscribe 100 observers to publish_subject 197671.00 ns 15917.30 ns 15701.14 ns 1.01
100 on_next to 100 observers to publish_subject 26982.47 ns 20276.37 ns 20189.50 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1384.61 ns 12.96 ns 12.96 ns 1.00
basic sample with immediate scheduler 1379.71 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

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

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2054.12 ns 985.94 ns 994.45 ns 0.99
create(on_error())+retry(1)+subscribe 582.09 ns 113.82 ns 112.09 ns 1.02

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 978.46 ns 0.93 ns 1.30 ns 0.72
Subscribe empty callbacks to empty observable via pipe operator 985.69 ns 0.94 ns 1.44 ns 0.65

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1920.44 ns 0.23 ns 0.36 ns 0.65
from array of 1 - create + subscribe + current_thread 2456.40 ns 34.87 ns 46.72 ns 0.75
concat_as_source of just(1 immediate) create + subscribe 5425.01 ns 317.44 ns 408.28 ns 0.78
defer from array of 1 - defer + create + subscribe + immediate 3624.52 ns 0.33 ns 0.26 ns 1.29
interval - interval + take(3) + subscribe + immediate 7943.95 ns 165.58 ns 139.89 ns 1.18
interval - interval + take(3) + subscribe + current_thread 11693.31 ns 127.73 ns 113.04 ns 1.13
from array of 1 - create + as_blocking + subscribe + new_thread 84557.14 ns 80942.77 ns 110933.60 ns 0.73
from array of 1000 - create + as_blocking + subscribe + new_thread 91639.08 ns 88722.23 ns 110597.90 ns 0.80
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 9091.65 ns 360.80 ns 384.93 ns 0.94

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2877.21 ns 0.23 ns 0.31 ns 0.76
immediate_just+filter(true)+subscribe 2222.19 ns 0.23 ns 0.32 ns 0.74
immediate_just(1,2)+skip(1)+subscribe 2993.68 ns 0.26 ns 0.32 ns 0.83
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2198.48 ns 0.49 ns 0.61 ns 0.79
immediate_just(1,2)+first()+subscribe 3212.01 ns 0.23 ns 0.31 ns 0.77
immediate_just(1,2)+last()+subscribe 2799.25 ns 0.23 ns 0.32 ns 0.74
immediate_just+take_last(1)+subscribe 3019.45 ns 0.24 ns 0.31 ns 0.78
immediate_just(1,2,3)+element_at(1)+subscribe 2440.08 ns 0.26 ns 0.31 ns 0.83

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 1094.83 ns 0.64 ns 0.53 ns 1.19
current_thread scheduler create worker + schedule 1310.76 ns 43.62 ns 36.37 ns 1.20
current_thread scheduler create worker + schedule + recursive schedule 2210.28 ns 225.33 ns 251.50 ns 0.90

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2112.06 ns 4.20 ns 4.95 ns 0.85
immediate_just+scan(10, std::plus)+subscribe 2691.58 ns 0.47 ns 0.64 ns 0.73
immediate_just+flat_map(immediate_just(v*2))+subscribe 5288.59 ns 459.64 ns 523.03 ns 0.88
immediate_just+buffer(2)+subscribe 2493.04 ns 66.47 ns 93.31 ns 0.71
immediate_just+window(2)+subscribe + subscsribe inner 5371.43 ns 2362.64 ns 3189.36 ns 0.74

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2096.93 ns - - 0.00
immediate_just+take_while(true)+subscribe 2115.82 ns 0.23 ns 0.27 ns 0.88

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 5149.81 ns 5.33 ns 6.22 ns 0.86

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 8270.29 ns 440.65 ns 444.95 ns 0.99
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 9416.14 ns 422.31 ns 434.00 ns 0.97
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 489.15 ns 471.19 ns 1.04
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 8035.03 ns 2040.42 ns 2160.15 ns 0.94
immediate_just(1) + zip(immediate_just(2)) + subscribe 5243.95 ns 858.34 ns 1310.59 ns 0.65
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 8060.13 ns 2509.98 ns 2956.42 ns 0.85

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 76.12 ns 48.74 ns 54.90 ns 0.89
subscribe 100 observers to publish_subject 347172.67 ns 40634.40 ns 46789.48 ns 0.87
100 on_next to 100 observers to publish_subject 51933.32 ns 19227.38 ns 22267.59 ns 0.86

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2780.56 ns 63.50 ns 74.57 ns 0.85
basic sample with immediate scheduler 2763.17 ns 19.26 ns 21.94 ns 0.88

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2412.27 ns 0.23 ns 0.29 ns 0.79

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 6452.32 ns 4069.14 ns 5604.16 ns 0.73
create(on_error())+retry(1)+subscribe 1822.80 ns 276.69 ns 286.56 ns 0.97

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 281.78 ns 0.63 ns 1.55 ns 0.41
Subscribe empty callbacks to empty observable via pipe operator 274.65 ns 0.63 ns 1.54 ns 0.41

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 561.38 ns 0.31 ns 0.42 ns 0.73
from array of 1 - create + subscribe + current_thread 795.05 ns 4.01 ns 4.01 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2360.69 ns 128.71 ns 130.11 ns 0.99
defer from array of 1 - defer + create + subscribe + immediate 778.47 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2227.08 ns 58.31 ns 58.31 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3199.49 ns 30.89 ns 30.88 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 30179.26 ns 27915.79 ns 29929.21 ns 0.93
from array of 1000 - create + as_blocking + subscribe + new_thread 39506.66 ns 33672.97 ns 43192.83 ns 0.78
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3726.73 ns 148.58 ns 148.10 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1148.06 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 835.65 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1085.03 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 878.89 ns 0.62 ns 0.62 ns 1.00
immediate_just(1,2)+first()+subscribe 1351.65 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 1005.96 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1190.40 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 866.73 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 280.21 ns 1.54 ns 0.63 ns 2.44
current_thread scheduler create worker + schedule 391.54 ns 4.32 ns 4.32 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 854.67 ns 54.47 ns 55.55 ns 0.98

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 845.39 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 975.12 ns 0.46 ns 0.31 ns 1.48
immediate_just+flat_map(immediate_just(v*2))+subscribe 2245.27 ns 142.14 ns 140.15 ns 1.01
immediate_just+buffer(2)+subscribe 1536.04 ns 13.59 ns 13.59 ns 1.00
immediate_just+window(2)+subscribe + subscsribe inner 2470.03 ns 922.59 ns 893.72 ns 1.03

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2056.06 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3228.01 ns 155.77 ns 156.03 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3727.97 ns 140.16 ns 139.21 ns 1.01
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 141.37 ns 142.09 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3334.00 ns 831.64 ns 827.82 ns 1.00
immediate_just(1) + zip(immediate_just(2)) + subscribe 2235.07 ns 206.88 ns 202.16 ns 1.02
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 3239.69 ns 951.75 ns 959.26 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 52.20 ns 17.69 ns 17.76 ns 1.00
subscribe 100 observers to publish_subject 202969.20 ns 16026.82 ns 16121.65 ns 0.99
100 on_next to 100 observers to publish_subject 38309.67 ns 23651.16 ns 23591.16 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1276.98 ns 12.04 ns 12.04 ns 1.00
basic sample with immediate scheduler 1286.33 ns 5.86 ns 5.86 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 992.78 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 2272.96 ns 1167.75 ns 1176.18 ns 0.99
create(on_error())+retry(1)+subscribe 653.83 ns 140.56 ns 139.59 ns 1.01

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 572.71 ns 2.16 ns 1.85 ns 1.17
Subscribe empty callbacks to empty observable via pipe operator 591.42 ns 2.16 ns 1.85 ns 1.17

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1174.43 ns 5.24 ns 5.24 ns 1.00
from array of 1 - create + subscribe + current_thread 1445.62 ns 15.49 ns 15.45 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 3735.23 ns 172.53 ns 170.46 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 1214.35 ns 5.24 ns 5.24 ns 1.00
interval - interval + take(3) + subscribe + immediate 3424.22 ns 140.48 ns 140.86 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3531.27 ns 59.72 ns 62.47 ns 0.96
from array of 1 - create + as_blocking + subscribe + new_thread 117800.00 ns 111945.45 ns 114730.00 ns 0.98
from array of 1000 - create + as_blocking + subscribe + new_thread 125988.89 ns 127111.11 ns 132100.00 ns 0.96
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 5459.12 ns 196.20 ns 204.70 ns 0.96

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1836.27 ns 19.42 ns 19.74 ns 0.98
immediate_just+filter(true)+subscribe 1345.57 ns 18.50 ns 18.80 ns 0.98
immediate_just(1,2)+skip(1)+subscribe 1736.90 ns 17.89 ns 18.50 ns 0.97
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1383.01 ns 20.67 ns 23.44 ns 0.88
immediate_just(1,2)+first()+subscribe 2399.16 ns 18.20 ns 17.28 ns 1.05
immediate_just(1,2)+last()+subscribe 1472.52 ns 19.12 ns 18.52 ns 1.03
immediate_just+take_last(1)+subscribe 2031.65 ns 64.36 ns 64.38 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 1646.30 ns 20.98 ns 21.91 ns 0.96

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 483.12 ns 4.32 ns 4.32 ns 1.00
current_thread scheduler create worker + schedule 663.76 ns 12.03 ns 11.70 ns 1.03
current_thread scheduler create worker + schedule + recursive schedule 1100.54 ns 104.31 ns 102.07 ns 1.02

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1354.89 ns 18.81 ns 18.82 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1448.93 ns 20.96 ns 20.97 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 3499.70 ns 179.88 ns 180.34 ns 1.00
immediate_just+buffer(2)+subscribe 2367.36 ns 65.58 ns 65.04 ns 1.01
immediate_just+window(2)+subscribe + subscsribe inner 4055.34 ns 1299.55 ns 1320.02 ns 0.98

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1334.59 ns 17.57 ns 17.57 ns 1.00
immediate_just+take_while(true)+subscribe 1350.82 ns 18.50 ns 18.81 ns 0.98

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3187.23 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 5049.32 ns 205.25 ns 201.76 ns 1.02
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 5459.39 ns 187.00 ns 186.19 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 195.03 ns 196.20 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 5840.86 ns 952.39 ns 950.84 ns 1.00
immediate_just(1) + zip(immediate_just(2)) + subscribe 3585.53 ns 521.68 ns 519.14 ns 1.00
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 4894.55 ns 1270.15 ns 1172.56 ns 1.08

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.35 ns 20.10 ns 20.08 ns 1.00
subscribe 100 observers to publish_subject 264725.00 ns 27267.57 ns 27061.90 ns 1.01
100 on_next to 100 observers to publish_subject 51671.43 ns 35768.97 ns 35741.38 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1902.13 ns 96.24 ns 98.19 ns 0.98
basic sample with immediate scheduler 1893.06 ns 66.52 ns 69.04 ns 0.96

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1488.10 ns 19.11 ns 19.42 ns 0.98

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1951.62 ns 363.92 ns 362.69 ns 1.00
create(on_error())+retry(1)+subscribe 1504.06 ns 139.29 ns 138.74 ns 1.00

@codecov

codecov Bot commented Nov 10, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.64%. Comparing base (9aa557c) to head (17ed37e).
Report is 2 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2     #678      +/-   ##
==========================================
+ Coverage   98.47%   98.64%   +0.17%     
==========================================
  Files         155      155              
  Lines        9695     9736      +41     
==========================================
+ Hits         9547     9604      +57     
+ Misses        148      132      -16     

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

@sonarqubecloud

Copy link
Copy Markdown

@AlexInLog AlexInLog marked this pull request as ready for review November 10, 2024 16:48
@AlexInLog AlexInLog merged commit 37e4949 into v2 Nov 10, 2024
@AlexInLog AlexInLog deleted the coverage branch November 10, 2024 16:48
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