Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid test case in FindDocInfosByKeys #972

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

kokodak
Copy link
Member

@kokodak kokodak commented Aug 20, 2024

What this PR does / why we need it:

The current test case, the intent of the test(there is a length validation so that no errors are thrown) and the actual test are different.

In practice, current FindDocInfosByKeys test passes without length validation on the key list.

This is because var keys []key.Key is a nil slice, and []key.Key{} is a non-nil slice.

var keys []key.Key

infos, err := db.FindDocInfosByKeys(ctx, projectID, []key.Key{})

The difference between the two is important, so in this PR, it modifies the test code to match the intent of the original test.

If a nil value is inserted into a DB query, it can lead to unintended results, so it would be nice to be aware of this.

Which issue(s) this PR fixes:

Related to #943

Special notes for your reviewer:

Thanks for your review!

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Enhanced code readability by adjusting the representation of an empty slice of keys in the test case to a more idiomatic format.

@kokodak kokodak self-assigned this Aug 20, 2024
Copy link

coderabbitai bot commented Aug 20, 2024

Walkthrough

The recent changes improve the RunFindDocInfosByKeysTest function by changing how an empty slice of keys is represented. The inline literal has been replaced with a nil value, streamlining the code and enhancing its idiomatic expression. This adjustment does not affect the original functionality, maintaining the test's assertions and overall flow.

Changes

Files Change Summary
server/backend/database/testcases/testcases.go Changed the representation of an empty slice from an inline literal to nil, simplifying the code; no functional changes.

Poem

In the land of code where bunnies dwell,
An empty slice now casts its spell.
With nil we leap, so light and free,
Our tests are bright as they can be! 🐇✨
A simple shift, a joyful cheer,
In every change, our vision's clear!


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

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

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

CodeRabbit Commands (invoked as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

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

Documentation and Community

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between eb0c2d3 and c942b78.

Files selected for processing (1)
  • server/backend/database/testcases/testcases.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • server/backend/database/testcases/testcases.go

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.06%. Comparing base (d73a0f0) to head (a0fed90).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #972   +/-   ##
=======================================
  Coverage   51.06%   51.06%           
=======================================
  Files          73       73           
  Lines       10782    10782           
=======================================
  Hits         5506     5506           
  Misses       4725     4725           
  Partials      551      551           

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c942b78 and a0fed90.

Files selected for processing (1)
  • server/backend/database/testcases/testcases.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • server/backend/database/testcases/testcases.go

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Go Benchmark

Benchmark suite Current: a0fed90 Previous: c942b78 Ratio
BenchmarkDocument/constructor_test 1524 ns/op 1337 B/op 24 allocs/op 1505 ns/op 1337 B/op 24 allocs/op 1.01
BenchmarkDocument/constructor_test - ns/op 1524 ns/op 1505 ns/op 1.01
BenchmarkDocument/constructor_test - B/op 1337 B/op 1337 B/op 1
BenchmarkDocument/constructor_test - allocs/op 24 allocs/op 24 allocs/op 1
BenchmarkDocument/status_test 951.4 ns/op 1305 B/op 22 allocs/op 1129 ns/op 1305 B/op 22 allocs/op 0.84
BenchmarkDocument/status_test - ns/op 951.4 ns/op 1129 ns/op 0.84
BenchmarkDocument/status_test - B/op 1305 B/op 1305 B/op 1
BenchmarkDocument/status_test - allocs/op 22 allocs/op 22 allocs/op 1
BenchmarkDocument/equals_test 7642 ns/op 7273 B/op 132 allocs/op 7682 ns/op 7273 B/op 132 allocs/op 0.99
BenchmarkDocument/equals_test - ns/op 7642 ns/op 7682 ns/op 0.99
BenchmarkDocument/equals_test - B/op 7273 B/op 7273 B/op 1
BenchmarkDocument/equals_test - allocs/op 132 allocs/op 132 allocs/op 1
BenchmarkDocument/nested_update_test 16993 ns/op 12139 B/op 262 allocs/op 17207 ns/op 12139 B/op 262 allocs/op 0.99
BenchmarkDocument/nested_update_test - ns/op 16993 ns/op 17207 ns/op 0.99
BenchmarkDocument/nested_update_test - B/op 12139 B/op 12139 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 262 allocs/op 262 allocs/op 1
BenchmarkDocument/delete_test 22794 ns/op 15364 B/op 341 allocs/op 22824 ns/op 15363 B/op 341 allocs/op 1.00
BenchmarkDocument/delete_test - ns/op 22794 ns/op 22824 ns/op 1.00
BenchmarkDocument/delete_test - B/op 15364 B/op 15363 B/op 1.00
BenchmarkDocument/delete_test - allocs/op 341 allocs/op 341 allocs/op 1
BenchmarkDocument/object_test 8817 ns/op 6817 B/op 120 allocs/op 8768 ns/op 6817 B/op 120 allocs/op 1.01
BenchmarkDocument/object_test - ns/op 8817 ns/op 8768 ns/op 1.01
BenchmarkDocument/object_test - B/op 6817 B/op 6817 B/op 1
BenchmarkDocument/object_test - allocs/op 120 allocs/op 120 allocs/op 1
BenchmarkDocument/array_test 34802 ns/op 11947 B/op 276 allocs/op 29475 ns/op 11946 B/op 276 allocs/op 1.18
BenchmarkDocument/array_test - ns/op 34802 ns/op 29475 ns/op 1.18
BenchmarkDocument/array_test - B/op 11947 B/op 11946 B/op 1.00
BenchmarkDocument/array_test - allocs/op 276 allocs/op 276 allocs/op 1
BenchmarkDocument/text_test 30746 ns/op 14715 B/op 469 allocs/op 30731 ns/op 14715 B/op 469 allocs/op 1.00
BenchmarkDocument/text_test - ns/op 30746 ns/op 30731 ns/op 1.00
BenchmarkDocument/text_test - B/op 14715 B/op 14715 B/op 1
BenchmarkDocument/text_test - allocs/op 469 allocs/op 469 allocs/op 1
BenchmarkDocument/text_composition_test 29239 ns/op 18422 B/op 484 allocs/op 28971 ns/op 18422 B/op 484 allocs/op 1.01
BenchmarkDocument/text_composition_test - ns/op 29239 ns/op 28971 ns/op 1.01
BenchmarkDocument/text_composition_test - B/op 18422 B/op 18422 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 484 allocs/op 484 allocs/op 1
BenchmarkDocument/rich_text_test 81296 ns/op 38476 B/op 1148 allocs/op 80866 ns/op 38476 B/op 1148 allocs/op 1.01
BenchmarkDocument/rich_text_test - ns/op 81296 ns/op 80866 ns/op 1.01
BenchmarkDocument/rich_text_test - B/op 38476 B/op 38476 B/op 1
BenchmarkDocument/rich_text_test - allocs/op 1148 allocs/op 1148 allocs/op 1
BenchmarkDocument/counter_test 17468 ns/op 10722 B/op 244 allocs/op 17448 ns/op 10722 B/op 244 allocs/op 1.00
BenchmarkDocument/counter_test - ns/op 17468 ns/op 17448 ns/op 1.00
BenchmarkDocument/counter_test - B/op 10722 B/op 10722 B/op 1
BenchmarkDocument/counter_test - allocs/op 244 allocs/op 244 allocs/op 1
BenchmarkDocument/text_edit_gc_100 1300334 ns/op 870977 B/op 16752 allocs/op 1278808 ns/op 870947 B/op 16752 allocs/op 1.02
BenchmarkDocument/text_edit_gc_100 - ns/op 1300334 ns/op 1278808 ns/op 1.02
BenchmarkDocument/text_edit_gc_100 - B/op 870977 B/op 870947 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 16752 allocs/op 16752 allocs/op 1
BenchmarkDocument/text_edit_gc_1000 50450988 ns/op 50536373 B/op 181722 allocs/op 50112534 ns/op 50535086 B/op 181712 allocs/op 1.01
BenchmarkDocument/text_edit_gc_1000 - ns/op 50450988 ns/op 50112534 ns/op 1.01
BenchmarkDocument/text_edit_gc_1000 - B/op 50536373 B/op 50535086 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 181722 allocs/op 181712 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 1902817 ns/op 1528832 B/op 15605 allocs/op 1877901 ns/op 1528795 B/op 15605 allocs/op 1.01
BenchmarkDocument/text_split_gc_100 - ns/op 1902817 ns/op 1877901 ns/op 1.01
BenchmarkDocument/text_split_gc_100 - B/op 1528832 B/op 1528795 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 15605 allocs/op 15605 allocs/op 1
BenchmarkDocument/text_split_gc_1000 111748663 ns/op 135078178 B/op 182222 allocs/op 113399689 ns/op 135077152 B/op 182199 allocs/op 0.99
BenchmarkDocument/text_split_gc_1000 - ns/op 111748663 ns/op 113399689 ns/op 0.99
BenchmarkDocument/text_split_gc_1000 - B/op 135078178 B/op 135077152 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 182222 allocs/op 182199 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 18514034 ns/op 10183340 B/op 40676 allocs/op 16491159 ns/op 10183193 B/op 40674 allocs/op 1.12
BenchmarkDocument/text_delete_all_10000 - ns/op 18514034 ns/op 16491159 ns/op 1.12
BenchmarkDocument/text_delete_all_10000 - B/op 10183340 B/op 10183193 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40676 allocs/op 40674 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 335144574 ns/op 142667904 B/op 411609 allocs/op 284331655 ns/op 142670072 B/op 411654 allocs/op 1.18
BenchmarkDocument/text_delete_all_100000 - ns/op 335144574 ns/op 284331655 ns/op 1.18
BenchmarkDocument/text_delete_all_100000 - B/op 142667904 B/op 142670072 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411609 allocs/op 411654 allocs/op 1.00
BenchmarkDocument/text_100 236525 ns/op 120037 B/op 5081 allocs/op 215466 ns/op 120036 B/op 5081 allocs/op 1.10
BenchmarkDocument/text_100 - ns/op 236525 ns/op 215466 ns/op 1.10
BenchmarkDocument/text_100 - B/op 120037 B/op 120036 B/op 1.00
BenchmarkDocument/text_100 - allocs/op 5081 allocs/op 5081 allocs/op 1
BenchmarkDocument/text_1000 2515252 ns/op 1169025 B/op 50085 allocs/op 2364418 ns/op 1169023 B/op 50085 allocs/op 1.06
BenchmarkDocument/text_1000 - ns/op 2515252 ns/op 2364418 ns/op 1.06
BenchmarkDocument/text_1000 - B/op 1169025 B/op 1169023 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50085 allocs/op 50085 allocs/op 1
BenchmarkDocument/array_1000 1288208 ns/op 1091466 B/op 11832 allocs/op 1213247 ns/op 1091396 B/op 11832 allocs/op 1.06
BenchmarkDocument/array_1000 - ns/op 1288208 ns/op 1213247 ns/op 1.06
BenchmarkDocument/array_1000 - B/op 1091466 B/op 1091396 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11832 allocs/op 11832 allocs/op 1
BenchmarkDocument/array_10000 13819404 ns/op 9800672 B/op 120299 allocs/op 13219543 ns/op 9800334 B/op 120298 allocs/op 1.05
BenchmarkDocument/array_10000 - ns/op 13819404 ns/op 13219543 ns/op 1.05
BenchmarkDocument/array_10000 - B/op 9800672 B/op 9800334 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120299 allocs/op 120298 allocs/op 1.00
BenchmarkDocument/array_gc_100 156022 ns/op 132741 B/op 1261 allocs/op 147779 ns/op 132732 B/op 1261 allocs/op 1.06
BenchmarkDocument/array_gc_100 - ns/op 156022 ns/op 147779 ns/op 1.06
BenchmarkDocument/array_gc_100 - B/op 132741 B/op 132732 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1261 allocs/op 1261 allocs/op 1
BenchmarkDocument/array_gc_1000 1475942 ns/op 1159207 B/op 12877 allocs/op 1392542 ns/op 1159143 B/op 12877 allocs/op 1.06
BenchmarkDocument/array_gc_1000 - ns/op 1475942 ns/op 1392542 ns/op 1.06
BenchmarkDocument/array_gc_1000 - B/op 1159207 B/op 1159143 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12877 allocs/op 12877 allocs/op 1
BenchmarkDocument/counter_1000 213004 ns/op 193080 B/op 5771 allocs/op 198616 ns/op 193081 B/op 5771 allocs/op 1.07
BenchmarkDocument/counter_1000 - ns/op 213004 ns/op 198616 ns/op 1.07
BenchmarkDocument/counter_1000 - B/op 193080 B/op 193081 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5771 allocs/op 5771 allocs/op 1
BenchmarkDocument/counter_10000 2244676 ns/op 2087999 B/op 59778 allocs/op 2171880 ns/op 2087996 B/op 59778 allocs/op 1.03
BenchmarkDocument/counter_10000 - ns/op 2244676 ns/op 2171880 ns/op 1.03
BenchmarkDocument/counter_10000 - B/op 2087999 B/op 2087996 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59778 allocs/op 59778 allocs/op 1
BenchmarkDocument/object_1000 1498011 ns/op 1427959 B/op 9848 allocs/op 1372680 ns/op 1428105 B/op 9849 allocs/op 1.09
BenchmarkDocument/object_1000 - ns/op 1498011 ns/op 1372680 ns/op 1.09
BenchmarkDocument/object_1000 - B/op 1427959 B/op 1428105 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9848 allocs/op 9849 allocs/op 1.00
BenchmarkDocument/object_10000 16942163 ns/op 12165008 B/op 100558 allocs/op 15212632 ns/op 12167506 B/op 100566 allocs/op 1.11
BenchmarkDocument/object_10000 - ns/op 16942163 ns/op 15212632 ns/op 1.11
BenchmarkDocument/object_10000 - B/op 12165008 B/op 12167506 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100558 allocs/op 100566 allocs/op 1.00
BenchmarkDocument/tree_100 1083290 ns/op 943703 B/op 6101 allocs/op 1016838 ns/op 943706 B/op 6101 allocs/op 1.07
BenchmarkDocument/tree_100 - ns/op 1083290 ns/op 1016838 ns/op 1.07
BenchmarkDocument/tree_100 - B/op 943703 B/op 943706 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6101 allocs/op 6101 allocs/op 1
BenchmarkDocument/tree_1000 80170228 ns/op 86460424 B/op 60114 allocs/op 71764546 ns/op 86460307 B/op 60115 allocs/op 1.12
BenchmarkDocument/tree_1000 - ns/op 80170228 ns/op 71764546 ns/op 1.12
BenchmarkDocument/tree_1000 - B/op 86460424 B/op 86460307 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60114 allocs/op 60115 allocs/op 1.00
BenchmarkDocument/tree_10000 9949057525 ns/op 8580659344 B/op 600206 allocs/op 9406563158 ns/op 8580669920 B/op 600221 allocs/op 1.06
BenchmarkDocument/tree_10000 - ns/op 9949057525 ns/op 9406563158 ns/op 1.06
BenchmarkDocument/tree_10000 - B/op 8580659344 B/op 8580669920 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600206 allocs/op 600221 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 80920558 ns/op 87509294 B/op 75263 allocs/op 73811136 ns/op 87510589 B/op 75267 allocs/op 1.10
BenchmarkDocument/tree_delete_all_1000 - ns/op 80920558 ns/op 73811136 ns/op 1.10
BenchmarkDocument/tree_delete_all_1000 - B/op 87509294 B/op 87510589 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 75263 allocs/op 75267 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 3991301 ns/op 4146846 B/op 15141 allocs/op 3743956 ns/op 4147773 B/op 15141 allocs/op 1.07
BenchmarkDocument/tree_edit_gc_100 - ns/op 3991301 ns/op 3743956 ns/op 1.07
BenchmarkDocument/tree_edit_gc_100 - B/op 4146846 B/op 4147773 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 15141 allocs/op 15141 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 326026097 ns/op 383749902 B/op 154868 allocs/op 300585280 ns/op 383743214 B/op 154845 allocs/op 1.08
BenchmarkDocument/tree_edit_gc_1000 - ns/op 326026097 ns/op 300585280 ns/op 1.08
BenchmarkDocument/tree_edit_gc_1000 - B/op 383749902 B/op 383743214 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 154868 allocs/op 154845 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 2732302 ns/op 2412561 B/op 11125 allocs/op 2498688 ns/op 2412441 B/op 11125 allocs/op 1.09
BenchmarkDocument/tree_split_gc_100 - ns/op 2732302 ns/op 2498688 ns/op 1.09
BenchmarkDocument/tree_split_gc_100 - B/op 2412561 B/op 2412441 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 11125 allocs/op 11125 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 195991492 ns/op 222251749 B/op 121997 allocs/op 182629740 ns/op 222250936 B/op 121988 allocs/op 1.07
BenchmarkDocument/tree_split_gc_1000 - ns/op 195991492 ns/op 182629740 ns/op 1.07
BenchmarkDocument/tree_split_gc_1000 - B/op 222251749 B/op 222250936 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 121997 allocs/op 121988 allocs/op 1.00
BenchmarkRPC/client_to_server 373948117 ns/op 17101464 B/op 175800 allocs/op 379789956 ns/op 17026698 B/op 175774 allocs/op 0.98
BenchmarkRPC/client_to_server - ns/op 373948117 ns/op 379789956 ns/op 0.98
BenchmarkRPC/client_to_server - B/op 17101464 B/op 17026698 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 175800 allocs/op 175774 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server 625726284 ns/op 34351368 B/op 321576 allocs/op 629453942 ns/op 32640688 B/op 320909 allocs/op 0.99
BenchmarkRPC/client_to_client_via_server - ns/op 625726284 ns/op 629453942 ns/op 0.99
BenchmarkRPC/client_to_client_via_server - B/op 34351368 B/op 32640688 B/op 1.05
BenchmarkRPC/client_to_client_via_server - allocs/op 321576 allocs/op 320909 allocs/op 1.00
BenchmarkRPC/attach_large_document 1181290489 ns/op 1919063720 B/op 8978 allocs/op 1262480983 ns/op 1896312752 B/op 8885 allocs/op 0.94
BenchmarkRPC/attach_large_document - ns/op 1181290489 ns/op 1262480983 ns/op 0.94
BenchmarkRPC/attach_large_document - B/op 1919063720 B/op 1896312752 B/op 1.01
BenchmarkRPC/attach_large_document - allocs/op 8978 allocs/op 8885 allocs/op 1.01
BenchmarkRPC/adminCli_to_server 544526209 ns/op 35954008 B/op 289543 allocs/op 550475348 ns/op 35940604 B/op 289528 allocs/op 0.99
BenchmarkRPC/adminCli_to_server - ns/op 544526209 ns/op 550475348 ns/op 0.99
BenchmarkRPC/adminCli_to_server - B/op 35954008 B/op 35940604 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 289543 allocs/op 289528 allocs/op 1.00
BenchmarkLocker 63.58 ns/op 16 B/op 1 allocs/op 64.11 ns/op 16 B/op 1 allocs/op 0.99
BenchmarkLocker - ns/op 63.58 ns/op 64.11 ns/op 0.99
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel 39.29 ns/op 0 B/op 0 allocs/op 38.05 ns/op 0 B/op 0 allocs/op 1.03
BenchmarkLockerParallel - ns/op 39.29 ns/op 38.05 ns/op 1.03
BenchmarkLockerParallel - B/op 0 B/op 0 B/op 1
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkLockerMoreKeys 145.5 ns/op 15 B/op 0 allocs/op 143.5 ns/op 15 B/op 0 allocs/op 1.01
BenchmarkLockerMoreKeys - ns/op 145.5 ns/op 143.5 ns/op 1.01
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkChange/Push_10_Changes 3870946 ns/op 121863 B/op 1286 allocs/op 3908165 ns/op 121751 B/op 1286 allocs/op 0.99
BenchmarkChange/Push_10_Changes - ns/op 3870946 ns/op 3908165 ns/op 0.99
BenchmarkChange/Push_10_Changes - B/op 121863 B/op 121751 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1286 allocs/op 1286 allocs/op 1
BenchmarkChange/Push_100_Changes 14489513 ns/op 572489 B/op 6656 allocs/op 14795719 ns/op 573572 B/op 6658 allocs/op 0.98
BenchmarkChange/Push_100_Changes - ns/op 14489513 ns/op 14795719 ns/op 0.98
BenchmarkChange/Push_100_Changes - B/op 572489 B/op 573572 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6656 allocs/op 6658 allocs/op 1.00
BenchmarkChange/Push_1000_Changes 116150696 ns/op 5285956 B/op 63149 allocs/op 116579612 ns/op 5208891 B/op 63149 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 116150696 ns/op 116579612 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 5285956 B/op 5208891 B/op 1.01
BenchmarkChange/Push_1000_Changes - allocs/op 63149 allocs/op 63149 allocs/op 1
BenchmarkChange/Pull_10_Changes 2996212 ns/op 101888 B/op 1009 allocs/op 2919922 ns/op 101528 B/op 1008 allocs/op 1.03
BenchmarkChange/Pull_10_Changes - ns/op 2996212 ns/op 2919922 ns/op 1.03
BenchmarkChange/Pull_10_Changes - B/op 101888 B/op 101528 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1009 allocs/op 1008 allocs/op 1.00
BenchmarkChange/Pull_100_Changes 4477165 ns/op 266886 B/op 3478 allocs/op 4345887 ns/op 266951 B/op 3479 allocs/op 1.03
BenchmarkChange/Pull_100_Changes - ns/op 4477165 ns/op 4345887 ns/op 1.03
BenchmarkChange/Pull_100_Changes - B/op 266886 B/op 266951 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3478 allocs/op 3479 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes 8718710 ns/op 1493139 B/op 29856 allocs/op 8949640 ns/op 1490717 B/op 29857 allocs/op 0.97
BenchmarkChange/Pull_1000_Changes - ns/op 8718710 ns/op 8949640 ns/op 0.97
BenchmarkChange/Pull_1000_Changes - B/op 1493139 B/op 1490717 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 29856 allocs/op 29857 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot 17226978 ns/op 712838 B/op 6660 allocs/op 17009255 ns/op 716973 B/op 6658 allocs/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 17226978 ns/op 17009255 ns/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - B/op 712838 B/op 716973 B/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6660 allocs/op 6658 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot 121442115 ns/op 5513375 B/op 63152 allocs/op 119802618 ns/op 5782540 B/op 63155 allocs/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 121442115 ns/op 119802618 ns/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - B/op 5513375 B/op 5782540 B/op 0.95
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 63152 allocs/op 63155 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot 6759250 ns/op 922127 B/op 15514 allocs/op 6631620 ns/op 922628 B/op 15514 allocs/op 1.02
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6759250 ns/op 6631620 ns/op 1.02
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 922127 B/op 922628 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 15514 allocs/op 15514 allocs/op 1
BenchmarkSnapshot/Pull_30KB_snapshot 16114757 ns/op 7158665 B/op 150111 allocs/op 15502244 ns/op 7150262 B/op 150110 allocs/op 1.04
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 16114757 ns/op 15502244 ns/op 1.04
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7158665 B/op 7150262 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 150111 allocs/op 150110 allocs/op 1.00
BenchmarkSync/memory_sync_10_test 6877 ns/op 1286 B/op 38 allocs/op 6871 ns/op 1286 B/op 38 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6877 ns/op 6871 ns/op 1.00
BenchmarkSync/memory_sync_10_test - B/op 1286 B/op 1286 B/op 1
BenchmarkSync/memory_sync_10_test - allocs/op 38 allocs/op 38 allocs/op 1
BenchmarkSync/memory_sync_100_test 51521 ns/op 8641 B/op 273 allocs/op 51527 ns/op 8637 B/op 273 allocs/op 1.00
BenchmarkSync/memory_sync_100_test - ns/op 51521 ns/op 51527 ns/op 1.00
BenchmarkSync/memory_sync_100_test - B/op 8641 B/op 8637 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 273 allocs/op 1
BenchmarkSync/memory_sync_1000_test 583917 ns/op 74286 B/op 2115 allocs/op 577408 ns/op 74429 B/op 2128 allocs/op 1.01
BenchmarkSync/memory_sync_1000_test - ns/op 583917 ns/op 577408 ns/op 1.01
BenchmarkSync/memory_sync_1000_test - B/op 74286 B/op 74429 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2115 allocs/op 2128 allocs/op 0.99
BenchmarkSync/memory_sync_10000_test 6958957 ns/op 744454 B/op 20382 allocs/op 7533315 ns/op 739005 B/op 20361 allocs/op 0.92
BenchmarkSync/memory_sync_10000_test - ns/op 6958957 ns/op 7533315 ns/op 0.92
BenchmarkSync/memory_sync_10000_test - B/op 744454 B/op 739005 B/op 1.01
BenchmarkSync/memory_sync_10000_test - allocs/op 20382 allocs/op 20361 allocs/op 1.00
BenchmarkTextEditing 4777312347 ns/op 3901915664 B/op 18743179 allocs/op 5151546858 ns/op 3901910640 B/op 18743181 allocs/op 0.93
BenchmarkTextEditing - ns/op 4777312347 ns/op 5151546858 ns/op 0.93
BenchmarkTextEditing - B/op 3901915664 B/op 3901910640 B/op 1.00
BenchmarkTextEditing - allocs/op 18743179 allocs/op 18743181 allocs/op 1.00
BenchmarkTree/10000_vertices_to_protobuf 3399044 ns/op 6262972 B/op 70025 allocs/op 3519551 ns/op 6262996 B/op 70025 allocs/op 0.97
BenchmarkTree/10000_vertices_to_protobuf - ns/op 3399044 ns/op 3519551 ns/op 0.97
BenchmarkTree/10000_vertices_to_protobuf - B/op 6262972 B/op 6262996 B/op 1.00
BenchmarkTree/10000_vertices_to_protobuf - allocs/op 70025 allocs/op 70025 allocs/op 1
BenchmarkTree/10000_vertices_from_protobuf 156215660 ns/op 442171486 B/op 290039 allocs/op 156700331 ns/op 442172618 B/op 290039 allocs/op 1.00
BenchmarkTree/10000_vertices_from_protobuf - ns/op 156215660 ns/op 156700331 ns/op 1.00
BenchmarkTree/10000_vertices_from_protobuf - B/op 442171486 B/op 442172618 B/op 1.00
BenchmarkTree/10000_vertices_from_protobuf - allocs/op 290039 allocs/op 290039 allocs/op 1
BenchmarkTree/20000_vertices_to_protobuf 7379937 ns/op 12716975 B/op 140028 allocs/op 7664828 ns/op 12716978 B/op 140028 allocs/op 0.96
BenchmarkTree/20000_vertices_to_protobuf - ns/op 7379937 ns/op 7664828 ns/op 0.96
BenchmarkTree/20000_vertices_to_protobuf - B/op 12716975 B/op 12716978 B/op 1.00
BenchmarkTree/20000_vertices_to_protobuf - allocs/op 140028 allocs/op 140028 allocs/op 1
BenchmarkTree/20000_vertices_from_protobuf 678679859 ns/op 1697267728 B/op 580042 allocs/op 696349542 ns/op 1697263856 B/op 580043 allocs/op 0.97
BenchmarkTree/20000_vertices_from_protobuf - ns/op 678679859 ns/op 696349542 ns/op 0.97
BenchmarkTree/20000_vertices_from_protobuf - B/op 1697267728 B/op 1697263856 B/op 1.00
BenchmarkTree/20000_vertices_from_protobuf - allocs/op 580042 allocs/op 580043 allocs/op 1.00
BenchmarkTree/30000_vertices_to_protobuf 11900170 ns/op 19318336 B/op 210031 allocs/op 12511620 ns/op 19318506 B/op 210031 allocs/op 0.95
BenchmarkTree/30000_vertices_to_protobuf - ns/op 11900170 ns/op 12511620 ns/op 0.95
BenchmarkTree/30000_vertices_to_protobuf - B/op 19318336 B/op 19318506 B/op 1.00
BenchmarkTree/30000_vertices_to_protobuf - allocs/op 210031 allocs/op 210031 allocs/op 1
BenchmarkTree/30000_vertices_from_protobuf 1633727412 ns/op 3752052392 B/op 870049 allocs/op 1638889799 ns/op 3752036024 B/op 870047 allocs/op 1.00
BenchmarkTree/30000_vertices_from_protobuf - ns/op 1633727412 ns/op 1638889799 ns/op 1.00
BenchmarkTree/30000_vertices_from_protobuf - B/op 3752052392 B/op 3752036024 B/op 1.00
BenchmarkTree/30000_vertices_from_protobuf - allocs/op 870049 allocs/op 870047 allocs/op 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@hackerwins hackerwins self-requested a review August 21, 2024 04:35
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@hackerwins hackerwins merged commit 14a49fa into main Aug 21, 2024
5 checks passed
@hackerwins hackerwins deleted the fix-finddocinfosbykeys-testcase branch August 21, 2024 04:35
binary-ho pushed a commit to binary-ho/yorkie that referenced this pull request Sep 1, 2024
raararaara pushed a commit that referenced this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants