Skip to content

Rollback lock-free implementation due to CPU overhead#1318

Merged
hackerwins merged 1 commit into
mainfrom
rollback-push-lock
Jun 11, 2025
Merged

Rollback lock-free implementation due to CPU overhead#1318
hackerwins merged 1 commit into
mainfrom
rollback-push-lock

Conversation

@hackerwins

@hackerwins hackerwins commented Jun 10, 2025

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Rollback lock-free implementation due to CPU overhead

Lock-free approach eliminated write lock contention. However, waiting
shifted to MongoDB Driver level causing unexpected CPU overhead.

This commit restores push-lock for immediate performance recovery.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Addressed and resolved all CodeRabbit review comments
  • Didn't break anything

Summary by CodeRabbit

  • Documentation

    • Updated documentation to clarify the locking and update sequence for pushing changes, including more detailed steps and revised descriptions.
  • Bug Fixes

    • Improved consistency and reliability of document updates by adjusting the order of database operations during change creation, reducing the risk of data inconsistencies.
  • Refactor

    • Modified internal locking behavior to ensure proper locking during push operations when changes are present or documents are removed.
  • Tests

    • Removed a redundant internal test related to concurrent change creation, streamlining the test suite.

@coderabbitai

coderabbitai Bot commented Jun 10, 2025

Copy link
Copy Markdown

Walkthrough

The changes introduce explicit conditional locking during document push operations, update documentation to clarify the locking and update sequence, refactor the MongoDB client method to ensure atomicity and conflict detection between inserting changes and updating document info, and remove a concurrent test for creating change infos along with its unused import.

Changes

File(s) Change Summary
design/fine-grained-document-locking.md Updated version, revised doc.push lock description, expanded and clarified the locking and update sequence in push operations.
server/packs/pushpull.go Added conditional acquisition and release of a document push lock during push operations; removed outdated lock-free comment.
server/backend/database/mongo/client.go Refactored CreateChangeInfos to fetch doc info first, insert changes, then update doc info with conflict detection and atomicity.
server/backend/database/testcases/testcases.go Removed concurrent "create change infos without conflict" test and corresponding unused "sync" package import.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Locker
    participant DB as Database

    Client->>Locker: Acquire doc.push lock (if changes or removal)
    alt Lock acquired
        Client->>DB: Fetch current document info
        alt No changes and not removed
            Client-->>Locker: Release lock
            Client-->>Client: Return early
        else Changes to push or removal
            Client->>DB: Insert changes (assign server_seq)
            DB-->>Client: Confirm insertion
            Client->>DB: Update doc info (server_seq, timestamps) with conflict detection
            alt Update succeeds
                Client-->>Locker: Release lock
                Client-->>Client: Return success
            else Conflict detected
                Client-->>Locker: Release lock
                Client-->>Client: Return conflict error
            end
        end
    end
Loading
sequenceDiagram
    participant Dev as Developer
    participant Doc as Documentation

    Dev->>Doc: Update doc.push lock description
    Dev->>Doc: Expand PushPull steps to detailed 5-step sequence
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bc2ac3 and 48952e6.

📒 Files selected for processing (4)
  • design/fine-grained-document-locking.md (3 hunks)
  • server/backend/database/mongo/client.go (2 hunks)
  • server/backend/database/testcases/testcases.go (0 hunks)
  • server/packs/pushpull.go (1 hunks)
💤 Files with no reviewable changes (1)
  • server/backend/database/testcases/testcases.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • server/packs/pushpull.go
  • design/fine-grained-document-locking.md
  • server/backend/database/mongo/client.go
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: complex-test
  • GitHub Check: bench
  • GitHub Check: build
  • GitHub Check: load-test
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

@codecov

codecov Bot commented Jun 10, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 61.11111% with 14 lines in your changes missing coverage. Please review.

Project coverage is 37.80%. Comparing base (da9241f) to head (48952e6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
server/backend/database/mongo/client.go 68.75% 6 Missing and 4 partials ⚠️
server/packs/pushpull.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1318      +/-   ##
==========================================
+ Coverage   37.78%   37.80%   +0.02%     
==========================================
  Files         182      182              
  Lines       28855    28810      -45     
==========================================
- Hits        10902    10893       -9     
+ Misses      17069    17031      -38     
- Partials      884      886       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hackerwins-yorkie hackerwins-yorkie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

k6 Load Test 📊

This is a comparison result between the previous(7bc2ac3) and the current commit(ee7dd54).

Change

Metric Previous Current Change
transaction_time.avg 5947.58 5821.16 🟢 -2.13%
http_req_duration.avg 288.34 271.10 🟢 -5.98%
http_req_duration.p(95) 1442.78 1371.06 🟢 -4.97%
iteration_duration.avg 5947.61 5821.20 🟢 -2.13%
data_received.count 849,385,430 885,843,335 🔴 +4.29%
data_sent.count 58,397,943 59,611,110 🔴 +2.08%

Result

Details
    script: test/k6/presence.ts

 scenarios: (100.00%) 1 scenario, 500 max VUs, 3m0s max duration (incl. graceful stop):
          * default: Up to 500 looping VUs for 2m30s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

█ THRESHOLDS

control_doc_latency
✓ 'p(95)<500' p(95)=0

http_req_duration
✓ 'p(95)<10000' p(95)=1.37s

transaction_success_rate
✓ 'rate>0.99' rate=100.00%

█ TOTAL RESULTS

checks_total.......................: 127198  834.398792/s
checks_succeeded...................: 100.00% 127198 out of 127198
checks_failed......................: 0.00%   0 out of 127198

✓ status is 200
✓ response has valid body

CUSTOM
active_clients..........................................................: 9220    60.481744/s
attach_documents........................................................: 9220    60.481744/s
control_doc_latency.....................................................: avg=0           min=0        med=0       max=0     p(90)=0      p(95)=0    
pushpulls...............................................................: 35939   235.754164/s
transaction_success_rate................................................: 100.00% 9220 out of 9220
transaction_time........................................................: avg=5821.164425 min=3018     med=5921    max=8812  p(90)=7689.1 p(95)=8015 

HTTP
http_req_duration.......................................................: avg=271.09ms    min=958.23µs med=21.56ms max=1.63s p(90)=1.26s  p(95)=1.37s
  { expected_response:true }............................................: avg=271.09ms    min=958.23µs med=21.56ms max=1.63s p(90)=1.26s  p(95)=1.37s
http_req_failed.........................................................: 0.00%   0 out of 63599
http_reqs...............................................................: 63599   417.199396/s

EXECUTION
iteration_duration......................................................: avg=5.82s       min=3.01s    med=5.92s   max=8.81s p(90)=7.68s  p(95)=8.01s
iterations..............................................................: 9220    60.481744/s
vus.....................................................................: 9       min=8            max=500
vus_max.................................................................: 500     min=500          max=500

NETWORK
data_received...........................................................: 886 MB  5.8 MB/s
data_sent...............................................................: 60 MB   391 kB/s

@hackerwins-yorkie hackerwins-yorkie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Go Benchmark Analysis 📊

This is a comparison result between the previous(7bc2ac3) and the current commit(ee7dd54).

Significant Changes (≥20% difference)

Benchmark suite Previous Current Change
BenchmarkPresenceConcurrency/100-100-10/ (ns/op) 2.23 s 1.08 s 🟢 -51.47%
BenchmarkPresenceConcurrency/100-100-10/ (B/op) 429.41 MB 327.19 MB 🟢 -23.80%
BenchmarkPresenceConcurrency/300-100-10/ (ns/op) 4.88 s 1.16 s 🟢 -76.28%
BenchmarkPresenceConcurrency/300-100-10/ (B/op) 744.69 MB 380.05 MB 🟢 -48.97%
BenchmarkPresenceConcurrency/300-100-10/ (allocs/op) 11,555,490 allocs 6,427,926 allocs 🟢 -44.37%
BenchmarkVersionVector/clients_1000/ (7_pushpull_after_detach(ms)) 5.00 ms 6.00 ms 🔴 +20.00%

Key Observations 🔍

  • The most significant improvement was seen in the BenchmarkPresenceConcurrency/300-100-10/ (ns/op) test, with a substantial decrease of 76.28% in execution time, indicating a notable performance enhancement.
  • In the BenchmarkVersionVector/clients_1000/ (7_pushpull_after_detach(ms)) test, there was a 20.00% increase in the time taken, suggesting a regression in performance for this particular benchmark.
  • Overall, many benchmarks exhibited improvements in performance, with several tests showing decreases in execution time, memory usage, and allocations.
  • A few benchmarks showed minor increases in execution time and memory usage, but the overall trend indicated optimizations and enhancements in the tested functionalities.

Clock Analysis

Lamport vs VersionVector

BenchmarkVersionVector Test

Lamport (v0.5.2)
Metric 10 clients 100 clients 1000 clients
Total Operation Time 84.96 ms 793.94 ms 34.79 s
Memory Allocations 35.11 MB 219.92 MB 4.91 GB
Number of Allocations (allocs/op) 69,271 1,246,728 81,485,288
ChangePack Size 138.0 B 137.0 B 141.0 B
Snapshot Size 379.0 B 3.08 KB 30.08 KB
Push-Pull Time 2.0 ms 1.5 ms 4.0 ms
Attach Time 4.5 ms 11.0 ms 31.0 ms
ChangePack After Detach 138.0 B 140.0 B 141.0 B
Snapshot After Detach 136.0 B 137.0 B 139.0 B
Push-Pull After Detach 2.5 ms 5.0 ms 9.5 ms
Version Vector (current)
Metric 10 clients 100 clients 1000 clients
Total Operation Time 127.86 ms 1.07 s 14.41 s
Memory Allocations 6.93 MB 76.98 MB 1.97 GB
Number of Allocations (allocs/op) 57,985 711,605 32,365,371
ChangePack Size 202.00 B 202.00 B 203.00 B
Snapshot Size 399.00 B 3.10 KB 30.10 KB
Push-Pull Time 5.00 ms 5.00 ms 5.00 ms
Attach Time 5.00 ms 7.00 ms 21.00 ms
ChangePack After Detach 262.00 B 263.00 B 263.00 B
Snapshot After Detach 156.00 B 156.00 B 156.00 B
Push-Pull After Detach 5.00 ms 5.00 ms 6.00 ms

BenchmarkSyncConcurrency Test

Metric Clients Lamport (v0.5.2) Version Vector (current)
Total Operation Time 1-100-10-10 7.48 s 11.43 s
100-100-10-10 9.62 s 12.54 s
300_100-10-10 14.77 s 15.14 s
Memory Allocations 1-100-10-10 1.15 GB 7.54 GB
100-100-10-10 1.45 GB 7.69 GB
300_100-10-10 2.19 GB 8.00 GB
Number of Allocations (allocs/op) 1-100-10-10 17,107,766 157,869,573
100-100-10-10 20,084,480 159,781,865
300_100-10-10 30,359,215 164,861,488

Summary

  • In the BenchmarkVersionVector test, the Version Vector clock system showed improved performance compared to Lamport across all client scenarios in terms of total operation time, memory allocations, and number of allocations per operation. The Version Vector clock system also exhibited consistent or slightly higher change pack sizes, snapshot sizes, and push-pull times.

  • For the BenchmarkSyncConcurrency test, the Version Vector clock system demonstrated lower total operation times and memory allocations than Lamport in all client concurrency scenarios. The number of allocations per operation was also generally lower for the Version Vector system. Overall, these results suggest that the Version Vector clock system performs better in concurrent scenarios compared to Lamport.

Detailed Test Results

BenchmarkDeletionConcurrency
Benchmark suite Previous Current Change
concurrent_text_delete_range_100/ (ns/op) 874.97 ms 863.89 ms 🟢 -1.27%
concurrent_text_delete_range_100/ (B/op) 63.03 MB 56.98 MB 🟢 -9.59%
concurrent_text_delete_range_100/ (allocs/op) 753,223 allocs 752,195 allocs 🟢 -0.14%
concurrent_text_delete_range_1000/ (ns/op) 7.23 s 7.17 s 🟢 -0.83%
concurrent_text_delete_range_1000/ (B/op) 374.52 MB 374.58 MB 🔴 +0.02%
concurrent_text_delete_range_1000/ (allocs/op) 7,283,105 allocs 7,283,948 allocs 🔴 +0.01%
concurrent_tree_delete_range_100/ (ns/op) 885.65 ms 875.65 ms 🟢 -1.13%
concurrent_tree_delete_range_100/ (B/op) 70.10 MB 67.89 MB 🟢 -3.16%
concurrent_tree_delete_range_100/ (allocs/op) 796,779 allocs 795,975 allocs 🟢 -0.10%
concurrent_tree_delete_range_1000/ (ns/op) 7.91 s 7.86 s 🟢 -0.55%
concurrent_tree_delete_range_1000/ (B/op) 911.30 MB 905.69 MB 🟢 -0.62%
concurrent_tree_delete_range_1000/ (allocs/op) 7,655,918 allocs 7,655,305 allocs ⚪ 0%
concurrent_text_edit_delete_all_100/ (ns/op) 761.14 ms 753.27 ms 🟢 -1.03%
concurrent_text_edit_delete_all_100/ (B/op) 54.71 MB 53.21 MB 🟢 -2.73%
concurrent_text_edit_delete_all_100/ (allocs/op) 635,763 allocs 635,012 allocs 🟢 -0.12%
concurrent_text_edit_delete_all_1000/ (ns/op) 5.96 s 5.96 s 🟢 -0.03%
concurrent_text_edit_delete_all_1000/ (B/op) 323.60 MB 319.16 MB 🟢 -1.37%
concurrent_text_edit_delete_all_1000/ (allocs/op) 5,941,358 allocs 5,940,328 allocs 🟢 -0.02%
concurrent_tree_edit_delete_all_100/ (ns/op) 789.73 ms 773.37 ms 🟢 -2.07%
concurrent_tree_edit_delete_all_100/ (B/op) 82.94 MB 85.12 MB 🔴 +2.62%
concurrent_tree_edit_delete_all_100/ (allocs/op) 874,213 allocs 873,360 allocs 🟢 -0.10%
concurrent_tree_edit_delete_all_1000/ (ns/op) 6.68 s 6.52 s 🟢 -2.34%
concurrent_tree_edit_delete_all_1000/ (B/op) 731.47 MB 726.96 MB 🟢 -0.62%
concurrent_tree_edit_delete_all_1000/ (allocs/op) 6,408,845 allocs 6,408,060 allocs 🟢 -0.01%
BenchmarkDocument
Benchmark suite Previous Current Change
constructor_test/ (ns/op) 1568.00 ns 1560.00 ns 🟢 -0.51%
constructor_test/ (B/op) 1.56 KB 1.56 KB ⚪ 0%
constructor_test/ (allocs/op) 27 allocs 27 allocs ⚪ 0%
status_test/ (ns/op) 1188.00 ns 1172.00 ns 🟢 -1.35%
status_test/ (B/op) 1.53 KB 1.53 KB ⚪ 0%
status_test/ (allocs/op) 25 allocs 25 allocs ⚪ 0%
equals_test/ (ns/op) 8203.00 ns 8134.00 ns 🟢 -0.84%
equals_test/ (B/op) 8.22 KB 8.22 KB ⚪ 0%
equals_test/ (allocs/op) 138 allocs 138 allocs ⚪ 0%
nested_update_test/ (ns/op) 17490.00 ns 17386.00 ns 🟢 -0.59%
nested_update_test/ (B/op) 12.81 KB 12.81 KB ⚪ 0%
nested_update_test/ (allocs/op) 266 allocs 266 allocs ⚪ 0%
delete_test/ (ns/op) 23610.00 ns 23464.00 ns 🟢 -0.62%
delete_test/ (B/op) 16.37 KB 16.37 KB ⚪ 0%
delete_test/ (allocs/op) 347 allocs 347 allocs ⚪ 0%
object_test/ (ns/op) 8850.00 ns 8891.00 ns 🔴 +0.46%
object_test/ (B/op) 7.38 KB 7.38 KB ⚪ 0%
object_test/ (allocs/op) 122 allocs 122 allocs ⚪ 0%
array_test/ (ns/op) 30062.00 ns 29464.00 ns 🟢 -1.99%
array_test/ (B/op) 12.66 KB 12.66 KB ⚪ 0%
array_test/ (allocs/op) 281 allocs 281 allocs ⚪ 0%
text_test/ (ns/op) 33135.00 ns 33187.00 ns 🔴 +0.16%
text_test/ (B/op) 15.48 KB 15.48 KB ⚪ 0%
text_test/ (allocs/op) 502 allocs 502 allocs ⚪ 0%
text_composition_test/ (ns/op) 31783.00 ns 33021.00 ns 🔴 +3.90%
text_composition_test/ (B/op) 16.95 KB 16.95 KB ⚪ 0%
text_composition_test/ (allocs/op) 488 allocs 488 allocs ⚪ 0%
rich_text_test/ (ns/op) 87880.00 ns 88005.00 ns 🔴 +0.14%
rich_text_test/ (B/op) 39.00 KB 39.00 KB ⚪ 0%
rich_text_test/ (allocs/op) 1,187 allocs 1,187 allocs ⚪ 0%
counter_test/ (ns/op) 17884.00 ns 17948.00 ns 🔴 +0.36%
counter_test/ (B/op) 12.41 KB 12.41 KB ⚪ 0%
counter_test/ (allocs/op) 255 allocs 255 allocs ⚪ 0%
text_edit_gc_100/ (ns/op) 1.43 ms 1.44 ms 🔴 +0.37%
text_edit_gc_100/ (B/op) 810.06 KB 810.06 KB ⚪ 0%
text_edit_gc_100/ (allocs/op) 16,784 allocs 16,785 allocs ⚪ 0%
text_edit_gc_1000/ (ns/op) 55.61 ms 55.10 ms 🟢 -0.92%
text_edit_gc_1000/ (B/op) 46.29 MB 46.29 MB ⚪ 0%
text_edit_gc_1000/ (allocs/op) 180,599 allocs 180,586 allocs ⚪ 0%
text_split_gc_100/ (ns/op) 2.15 ms 2.15 ms 🔴 +0.17%
text_split_gc_100/ (B/op) 1.53 MB 1.53 MB ⚪ 0%
text_split_gc_100/ (allocs/op) 15,552 allocs 15,553 allocs ⚪ 0%
text_split_gc_1000/ (ns/op) 131.26 ms 131.34 ms 🔴 +0.06%
text_split_gc_1000/ (B/op) 137.29 MB 137.29 MB ⚪ 0%
text_split_gc_1000/ (allocs/op) 181,001 allocs 180,994 allocs ⚪ 0%
text_100/ (ns/op) 235424.00 ns 236555.00 ns 🔴 +0.48%
text_100/ (B/op) 113.21 KB 113.21 KB ⚪ 0%
text_100/ (allocs/op) 4,984 allocs 4,984 allocs ⚪ 0%
text_1000/ (ns/op) 2.56 ms 2.58 ms 🔴 +0.78%
text_1000/ (B/op) 1.08 MB 1.08 MB ⚪ 0%
text_1000/ (allocs/op) 49,087 allocs 49,087 allocs ⚪ 0%
array_1000/ (ns/op) 1.30 ms 1.30 ms 🔴 +0.44%
array_1000/ (B/op) 1.13 MB 1.13 MB ⚪ 0%
array_1000/ (allocs/op) 12,882 allocs 12,882 allocs ⚪ 0%
array_10000/ (ns/op) 14.29 ms 14.29 ms 🔴 +0.06%
array_10000/ (B/op) 10.29 MB 10.29 MB ⚪ 0%
array_10000/ (allocs/op) 130,738 allocs 130,737 allocs ⚪ 0%
array_gc_100/ (ns/op) 138855.00 ns 138801.00 ns 🟢 -0.04%
array_gc_100/ (B/op) 104.28 KB 104.27 KB ⚪ 0%
array_gc_100/ (allocs/op) 1,369 allocs 1,369 allocs ⚪ 0%
array_gc_1000/ (ns/op) 1.48 ms 1.49 ms 🔴 +1.10%
array_gc_1000/ (B/op) 1.18 MB 1.18 MB ⚪ 0%
array_gc_1000/ (allocs/op) 13,929 allocs 13,929 allocs ⚪ 0%
counter_1000/ (ns/op) 203968.00 ns 203950.00 ns ⚪ 0%
counter_1000/ (B/op) 194.34 KB 194.34 KB ⚪ 0%
counter_1000/ (allocs/op) 5,772 allocs 5,772 allocs ⚪ 0%
counter_10000/ (ns/op) 2.18 ms 2.20 ms 🔴 +0.83%
counter_10000/ (B/op) 2.23 MB 2.23 MB ⚪ 0%
counter_10000/ (allocs/op) 59,779 allocs 59,779 allocs ⚪ 0%
object_1000/ (ns/op) 1.49 ms 1.51 ms 🔴 +1.69%
object_1000/ (B/op) 1.48 MB 1.48 MB 🔴 +0.01%
object_1000/ (allocs/op) 10,927 allocs 10,927 allocs ⚪ 0%
object_10000/ (ns/op) 16.99 ms 16.84 ms 🟢 -0.91%
object_10000/ (B/op) 12.75 MB 12.75 MB ⚪ 0%
object_10000/ (allocs/op) 111,231 allocs 111,234 allocs ⚪ 0%
tree_100/ (ns/op) 759782.00 ns 757180.00 ns 🟢 -0.34%
tree_100/ (B/op) 524.12 KB 524.12 KB ⚪ 0%
tree_100/ (allocs/op) 4,721 allocs 4,721 allocs ⚪ 0%
tree_1000/ (ns/op) 53.76 ms 51.92 ms 🟢 -3.42%
tree_1000/ (B/op) 43.74 MB 43.74 MB ⚪ 0%
tree_1000/ (allocs/op) 46,130 allocs 46,130 allocs ⚪ 0%
tree_10000/ (ns/op) 6.83 s 6.75 s 🟢 -1.27%
tree_10000/ (B/op) 4.30 GB 4.30 GB ⚪ 0%
tree_10000/ (allocs/op) 460,191 allocs 460,171 allocs ⚪ 0%
tree_edit_gc_100/ (ns/op) 2.72 ms 2.68 ms 🟢 -1.45%
tree_edit_gc_100/ (B/op) 2.40 MB 2.40 MB ⚪ 0%
tree_edit_gc_100/ (allocs/op) 11,568 allocs 11,568 allocs ⚪ 0%
tree_edit_gc_1000/ (ns/op) 212.80 ms 211.31 ms 🟢 -0.70%
tree_edit_gc_1000/ (B/op) 213.99 MB 213.99 MB ⚪ 0%
tree_edit_gc_1000/ (allocs/op) 115,148 allocs 115,149 allocs ⚪ 0%
tree_split_gc_100/ (ns/op) 2.11 ms 2.19 ms 🔴 +4.08%
tree_split_gc_100/ (B/op) 1.62 MB 1.62 MB ⚪ 0%
tree_split_gc_100/ (allocs/op) 9,605 allocs 9,605 allocs ⚪ 0%
tree_split_gc_1000/ (ns/op) 153.27 ms 150.09 ms 🟢 -2.08%
tree_split_gc_1000/ (B/op) 149.90 MB 149.90 MB ⚪ 0%
tree_split_gc_1000/ (allocs/op) 107,758 allocs 107,753 allocs ⚪ 0%
BenchmarkDocumentDeletion
Benchmark suite Previous Current Change
single_text_delete_all_10000/ (ns/op) 19.53 ms 18.64 ms 🟢 -4.56%
single_text_delete_all_10000/ (B/op) 10.82 MB 10.82 MB ⚪ 0%
single_text_delete_all_10000/ (allocs/op) 66,136 allocs 66,135 allocs ⚪ 0%
single_text_delete_all_100000/ (ns/op) 355.32 ms 336.61 ms 🟢 -5.27%
single_text_delete_all_100000/ (B/op) 107.92 MB 107.89 MB 🟢 -0.03%
single_text_delete_all_100000/ (allocs/op) 666,080 allocs 665,992 allocs 🟢 -0.01%
single_tree_delete_all_1000/ (ns/op) 52.58 ms 51.68 ms 🟢 -1.71%
single_tree_delete_all_1000/ (B/op) 44.69 MB 44.69 MB ⚪ 0%
single_tree_delete_all_1000/ (allocs/op) 57,201 allocs 57,204 allocs ⚪ 0%
single_text_delete_range_100/ (ns/op) 459871.00 ns 439037.00 ns 🟢 -4.53%
single_text_delete_range_100/ (B/op) 244.89 KB 244.89 KB ⚪ 0%
single_text_delete_range_100/ (allocs/op) 6,974 allocs 6,974 allocs ⚪ 0%
single_text_delete_range_1000/ (ns/op) 8.97 ms 8.78 ms 🟢 -2.22%
single_text_delete_range_1000/ (B/op) 6.39 MB 6.39 MB ⚪ 0%
single_text_delete_range_1000/ (allocs/op) 72,370 allocs 72,370 allocs ⚪ 0%
single_tree_delete_range_100/ (ns/op) 970037.00 ns 956873.00 ns 🟢 -1.36%
single_tree_delete_range_100/ (B/op) 711.54 KB 711.62 KB 🔴 +0.01%
single_tree_delete_range_100/ (allocs/op) 6,292 allocs 6,292 allocs ⚪ 0%
single_tree_delete_range_1000/ (ns/op) 60.70 ms 59.80 ms 🟢 -1.49%
single_tree_delete_range_1000/ (B/op) 54.54 MB 54.54 MB ⚪ 0%
single_tree_delete_range_1000/ (allocs/op) 62,433 allocs 62,434 allocs ⚪ 0%
BenchmarkRPC
Benchmark suite Previous Current Change
client_to_server/ (ns/op) 292.95 ms 297.39 ms 🔴 +1.51%
client_to_server/ (B/op) 12.12 MB 12.15 MB 🔴 +0.26%
client_to_server/ (allocs/op) 178,225 allocs 178,828 allocs 🔴 +0.34%
client_to_client_via_server/ (ns/op) 218.72 ms 218.29 ms 🟢 -0.20%
client_to_client_via_server/ (B/op) 21.33 MB 20.50 MB 🟢 -3.89%
client_to_client_via_server/ (allocs/op) 297,104 allocs 295,917 allocs 🟢 -0.40%
attach_large_document/ (ns/op) 1.50 s 1.37 s 🟢 -8.67%
attach_large_document/ (B/op) 1.88 GB 1.87 GB 🟢 -0.46%
attach_large_document/ (allocs/op) 10,787 allocs 11,057 allocs 🔴 +2.50%
adminCli_to_server/ (ns/op) 569.89 ms 569.62 ms 🟢 -0.05%
adminCli_to_server/ (B/op) 21.52 MB 21.52 MB ⚪ 0%
adminCli_to_server/ (allocs/op) 317,734 allocs 317,704 allocs ⚪ 0%
BenchmarkLocker
Benchmark suite Previous Current Change
(ns/op) 88.38 ns 83.84 ns 🟢 -5.14%
(B/op) 32.00 B 32.00 B ⚪ 0%
(allocs/op) 1 allocs 1 allocs ⚪ 0%
BenchmarkLockerParallel
Benchmark suite Previous Current Change
(ns/op) 50.71 ns 46.46 ns 🟢 -8.38%
(B/op) 0.00 B 0.00 B ⚪ 0%
(allocs/op) 0 allocs 0 allocs ⚪ 0%
BenchmarkLockerMoreKeys
Benchmark suite Previous Current Change
(ns/op) 189.30 ns 172.40 ns 🟢 -8.93%
(B/op) 30.00 B 31.00 B 🔴 +3.33%
(allocs/op) 0 allocs 0 allocs ⚪ 0%
BenchmarkRWLocker
Benchmark suite Previous Current Change
RWLock_rate_2/ (ns/op) 55.51 ns 49.96 ns 🟢 -10.00%
RWLock_rate_2/ (B/op) 0.00 B 0.00 B ⚪ 0%
RWLock_rate_2/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
RWLock_rate_10/ (ns/op) 50.27 ns 45.30 ns 🟢 -9.89%
RWLock_rate_10/ (B/op) 0.00 B 0.00 B ⚪ 0%
RWLock_rate_10/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
RWLock_rate_100/ (ns/op) 70.13 ns 60.40 ns 🟢 -13.87%
RWLock_rate_100/ (B/op) 2.00 B 2.00 B ⚪ 0%
RWLock_rate_100/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
RWLock_rate_1000/ (ns/op) 101.70 ns 89.21 ns 🟢 -12.28%
RWLock_rate_1000/ (B/op) 8.00 B 8.00 B ⚪ 0%
RWLock_rate_1000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
BenchmarkPresenceConcurrency
Benchmark suite Previous Current Change
0-100-10/ (ns/op) 1.08 s 1.06 s 🟢 -2.30%
0-100-10/ (B/op) 308.57 MB 306.98 MB 🟢 -0.52%
0-100-10/ (allocs/op) 4,789,896 allocs 4,778,071 allocs 🟢 -0.25%
100-100-10/ (ns/op) 2.23 s 1.08 s 🟢 -51.47%
100-100-10/ (B/op) 429.41 MB 327.19 MB 🟢 -23.80%
100-100-10/ (allocs/op) 6,493,767 allocs 5,321,996 allocs 🟢 -18.04%
300-100-10/ (ns/op) 4.88 s 1.16 s 🟢 -76.28%
300-100-10/ (B/op) 744.69 MB 380.05 MB 🟢 -48.97%
300-100-10/ (allocs/op) 11,555,490 allocs 6,427,926 allocs 🟢 -44.37%
BenchmarkChange
Benchmark suite Previous Current Change
Push_10_Changes/ (ns/op) 4.81 ms 4.75 ms 🟢 -1.16%
Push_10_Changes/ (B/op) 147.18 KB 147.14 KB 🟢 -0.03%
Push_10_Changes/ (allocs/op) 1,632 allocs 1,633 allocs 🔴 +0.06%
Push_100_Changes/ (ns/op) 18.92 ms 18.60 ms 🟢 -1.72%
Push_100_Changes/ (B/op) 774.69 KB 778.02 KB 🔴 +0.43%
Push_100_Changes/ (allocs/op) 8,875 allocs 8,877 allocs 🔴 +0.02%
Push_1000_Changes/ (ns/op) 154.80 ms 150.37 ms 🟢 -2.86%
Push_1000_Changes/ (B/op) 7.21 MB 7.30 MB 🔴 +1.37%
Push_1000_Changes/ (allocs/op) 83,263 allocs 83,260 allocs ⚪ 0%
Pull_10_Changes/ (ns/op) 3.62 ms 3.58 ms 🟢 -1.08%
Pull_10_Changes/ (B/op) 118.67 KB 119.05 KB 🔴 +0.32%
Pull_10_Changes/ (allocs/op) 1,334 allocs 1,335 allocs 🔴 +0.07%
Pull_100_Changes/ (ns/op) 5.76 ms 5.56 ms 🟢 -3.53%
Pull_100_Changes/ (B/op) 347.75 KB 348.42 KB 🔴 +0.19%
Pull_100_Changes/ (allocs/op) 4,968 allocs 4,969 allocs 🔴 +0.02%
Pull_1000_Changes/ (ns/op) 11.78 ms 12.87 ms 🔴 +9.26%
Pull_1000_Changes/ (B/op) 2.16 MB 2.16 MB 🔴 +0.22%
Pull_1000_Changes/ (allocs/op) 43,582 allocs 43,590 allocs 🔴 +0.02%
BenchmarkSnapshot
Benchmark suite Previous Current Change
Push_3KB_snapshot/ (ns/op) 22.45 ms 21.86 ms 🟢 -2.63%
Push_3KB_snapshot/ (B/op) 1.06 MB 1.06 MB 🔴 +0.09%
Push_3KB_snapshot/ (allocs/op) 11,399 allocs 11,396 allocs 🟢 -0.03%
Push_30KB_snapshot/ (ns/op) 159.93 ms 158.17 ms 🟢 -1.10%
Push_30KB_snapshot/ (B/op) 10.31 MB 10.22 MB 🟢 -0.90%
Push_30KB_snapshot/ (allocs/op) 124,968 allocs 126,885 allocs 🔴 +1.53%
Pull_3KB_snapshot/ (ns/op) 7.98 ms 7.94 ms 🟢 -0.50%
Pull_3KB_snapshot/ (B/op) 1.06 MB 1.06 MB 🔴 +0.16%
Pull_3KB_snapshot/ (allocs/op) 17,824 allocs 17,829 allocs 🔴 +0.03%
Pull_30KB_snapshot/ (ns/op) 21.82 ms 21.28 ms 🟢 -2.49%
Pull_30KB_snapshot/ (B/op) 8.85 MB 8.85 MB 🔴 +0.06%
Pull_30KB_snapshot/ (allocs/op) 171,831 allocs 171,845 allocs ⚪ 0%
BenchmarkSplayTree
Benchmark suite Previous Current Change
stress_test_100000/ (ns/op) 0.18 ns 0.18 ns 🔴 +0.45%
stress_test_100000/ (B/op) 0.00 B 0.00 B ⚪ 0%
stress_test_100000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
stress_test_200000/ (ns/op) 0.36 ns 0.35 ns 🟢 -3.94%
stress_test_200000/ (B/op) 0.00 B 0.00 B ⚪ 0%
stress_test_200000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
stress_test_300000/ (ns/op) 0.55 ns 0.57 ns 🔴 +2.34%
stress_test_300000/ (B/op) 0.00 B 0.00 B ⚪ 0%
stress_test_300000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
random_access_100000/ (ns/op) 0.01 ns 0.01 ns 🟢 -12.07%
random_access_100000/ (B/op) 0.00 B 0.00 B ⚪ 0%
random_access_100000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
random_access_200000/ (ns/op) 0.03 ns 0.03 ns 🔴 +1.81%
random_access_200000/ (B/op) 0.00 B 0.00 B ⚪ 0%
random_access_200000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
random_access_300000/ (ns/op) 0.05 ns 0.05 ns 🟢 -2.62%
random_access_300000/ (B/op) 0.00 B 0.00 B ⚪ 0%
random_access_300000/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
editing_trace_bench/ (ns/op) 0.00 ns 0.00 ns 🟢 -10.55%
editing_trace_bench/ (B/op) 0.00 B 0.00 B ⚪ 0%
editing_trace_bench/ (allocs/op) 0 allocs 0 allocs ⚪ 0%
BenchmarkSync
Benchmark suite Previous Current Change
memory_sync_10_test/ (ns/op) 6926.00 ns 7064.00 ns 🔴 +1.99%
memory_sync_10_test/ (B/op) 1.34 KB 1.34 KB ⚪ 0%
memory_sync_10_test/ (allocs/op) 35 allocs 35 allocs ⚪ 0%
memory_sync_100_test/ (ns/op) 55072.00 ns 55905.00 ns 🔴 +1.51%
memory_sync_100_test/ (B/op) 9.51 KB 9.50 KB 🟢 -0.08%
memory_sync_100_test/ (allocs/op) 268 allocs 268 allocs ⚪ 0%
memory_sync_1000_test/ (ns/op) 588654.00 ns 606063.00 ns 🔴 +2.96%
memory_sync_1000_test/ (B/op) 77.38 KB 76.22 KB 🟢 -1.49%
memory_sync_1000_test/ (allocs/op) 2,148 allocs 2,121 allocs 🟢 -1.26%
memory_sync_10000_test/ (ns/op) 7.58 ms 7.87 ms 🔴 +3.84%
memory_sync_10000_test/ (B/op) 756.26 KB 757.41 KB 🔴 +0.15%
memory_sync_10000_test/ (allocs/op) 20,458 allocs 20,454 allocs 🟢 -0.02%
BenchmarkSyncConcurrency
Benchmark suite Previous Current Change
1-100-10/ (ns/op) 11.63 s 11.43 s 🟢 -1.73%
1-100-10/ (B/op) 7.56 GB 7.54 GB 🟢 -0.25%
1-100-10/ (allocs/op) 157,734,481 allocs 157,869,573 allocs 🔴 +0.09%
100-100-10/ (ns/op) 12.77 s 12.54 s 🟢 -1.81%
100-100-10/ (B/op) 7.68 GB 7.69 GB 🔴 +0.11%
100-100-10/ (allocs/op) 159,827,625 allocs 159,781,865 allocs 🟢 -0.03%
300_100-10/ (ns/op) 15.28 s 15.14 s 🟢 -0.93%
300_100-10/ (B/op) 8.00 GB 8.00 GB 🔴 +0.04%
300_100-10/ (allocs/op) 164,873,202 allocs 164,861,488 allocs ⚪ 0%
BenchmarkTextEditing
Benchmark suite Previous Current Change
(ns/op) 5.84 s 5.68 s 🟢 -2.74%
(B/op) 3.89 GB 3.89 GB ⚪ 0%
(allocs/op) 20,282,719 allocs 20,282,838 allocs ⚪ 0%
BenchmarkTree
Benchmark suite Previous Current Change
10000_vertices_to_protobuf/ (ns/op) 4.82 ms 4.90 ms 🔴 +1.52%
10000_vertices_to_protobuf/ (B/op) 6.68 MB 6.68 MB ⚪ 0%
10000_vertices_to_protobuf/ (allocs/op) 90,026 allocs 90,026 allocs ⚪ 0%
10000_vertices_from_protobuf/ (ns/op) 226.04 ms 223.51 ms 🟢 -1.12%
10000_vertices_from_protobuf/ (B/op) 442.15 MB 442.14 MB ⚪ 0%
10000_vertices_from_protobuf/ (allocs/op) 280,065 allocs 280,046 allocs ⚪ 0%
20000_vertices_to_protobuf/ (ns/op) 10.27 ms 10.12 ms 🟢 -1.40%
20000_vertices_to_protobuf/ (B/op) 13.53 MB 13.53 MB ⚪ 0%
20000_vertices_to_protobuf/ (allocs/op) 180,029 allocs 180,029 allocs ⚪ 0%
20000_vertices_from_protobuf/ (ns/op) 893.57 ms 880.56 ms 🟢 -1.46%
20000_vertices_from_protobuf/ (B/op) 1.70 GB 1.70 GB ⚪ 0%
20000_vertices_from_protobuf/ (allocs/op) 560,124 allocs 560,123 allocs ⚪ 0%
30000_vertices_to_protobuf/ (ns/op) 15.77 ms 15.55 ms 🟢 -1.43%
30000_vertices_to_protobuf/ (B/op) 19.94 MB 19.94 MB ⚪ 0%
30000_vertices_to_protobuf/ (allocs/op) 270,030 allocs 270,031 allocs ⚪ 0%
30000_vertices_from_protobuf/ (ns/op) 2.02 s 1.96 s 🟢 -2.60%
30000_vertices_from_protobuf/ (B/op) 3.75 GB 3.75 GB ⚪ 0%
30000_vertices_from_protobuf/ (allocs/op) 840,126 allocs 840,127 allocs ⚪ 0%
BenchmarkVersionVector
Benchmark suite Previous Current Change
clients_10/ (ns/op) 133.36 ms 127.86 ms 🟢 -4.13%
clients_10/ (1_changepack(bytes)) 202.00 B 202.00 B ⚪ 0%
clients_10/ (2_snapshot(bytes)) 399.00 B 399.00 B ⚪ 0%
clients_10/ (3_pushpull(ms)) 5.00 ms 5.00 ms ⚪ 0%
clients_10/ (4_attach(ms)) 5.00 ms 5.00 ms ⚪ 0%
clients_10/ (5_changepack_after_detach(bytes)) 262.00 B 262.00 B ⚪ 0%
clients_10/ (6_snapshot_after_detach(bytes)) 156.00 B 156.00 B ⚪ 0%
clients_10/ (7_pushpull_after_detach(ms)) 5.00 ms 5.00 ms ⚪ 0%
clients_10/ (B/op) 7.31 MB 6.93 MB 🟢 -5.29%
clients_10/ (allocs/op) 58,846 allocs 57,985 allocs 🟢 -1.46%
clients_100/ (ns/op) 1.11 s 1.07 s 🟢 -3.06%
clients_100/ (1_changepack(bytes)) 202.00 B 202.00 B ⚪ 0%
clients_100/ (2_snapshot(bytes)) 3.10 KB 3.10 KB ⚪ 0%
clients_100/ (3_pushpull(ms)) 5.00 ms 5.00 ms ⚪ 0%
clients_100/ (4_attach(ms)) 7.00 ms 7.00 ms ⚪ 0%
clients_100/ (5_changepack_after_detach(bytes)) 263.00 B 263.00 B ⚪ 0%
clients_100/ (6_snapshot_after_detach(bytes)) 156.00 B 156.00 B ⚪ 0%
clients_100/ (7_pushpull_after_detach(ms)) 5.00 ms 5.00 ms ⚪ 0%
clients_100/ (B/op) 70.31 MB 76.98 MB 🔴 +9.48%
clients_100/ (allocs/op) 718,599 allocs 711,605 allocs 🟢 -0.97%
clients_1000/ (ns/op) 14.79 s 14.41 s 🟢 -2.59%
clients_1000/ (1_changepack(bytes)) 203.00 B 203.00 B ⚪ 0%
clients_1000/ (2_snapshot(bytes)) 30.10 KB 30.10 KB ⚪ 0%
clients_1000/ (3_pushpull(ms)) 5.00 ms 5.00 ms ⚪ 0%
clients_1000/ (4_attach(ms)) 24.00 ms 21.00 ms 🟢 -12.50%
clients_1000/ (5_changepack_after_detach(bytes)) 263.00 B 263.00 B ⚪ 0%
clients_1000/ (6_snapshot_after_detach(bytes)) 156.00 B 156.00 B ⚪ 0%
clients_1000/ (7_pushpull_after_detach(ms)) 5.00 ms 6.00 ms 🔴 +20.00%
clients_1000/ (B/op) 1.97 GB 1.97 GB 🟢 -0.34%
clients_1000/ (allocs/op) 32,434,995 allocs 32,365,371 allocs 🟢 -0.21%
BenchmarkWebhook
Benchmark suite Previous Current Change
Send_10_Webhooks_to_10_Endpoints/ (ns/op) 12.33 ms 12.24 ms 🟢 -0.74%
Send_10_Webhooks_to_10_Endpoints/ (B/op) 808.34 KB 808.01 KB 🟢 -0.04%
Send_10_Webhooks_to_10_Endpoints/ (allocs/op) 10,115 allocs 10,115 allocs ⚪ 0%
Send_100_Webhooks_to_10_Endpoints/ (ns/op) 120.88 ms 121.98 ms 🔴 +0.91%
Send_100_Webhooks_to_10_Endpoints/ (B/op) 8.08 MB 8.08 MB 🔴 +0.02%
Send_100_Webhooks_to_10_Endpoints/ (allocs/op) 101,158 allocs 101,153 allocs ⚪ 0%
Send_10_Webhooks_to_100_Endpoints/ (ns/op) 123.20 ms 124.30 ms 🔴 +0.89%
Send_10_Webhooks_to_100_Endpoints/ (B/op) 8.26 MB 8.26 MB 🔴 +0.03%
Send_10_Webhooks_to_100_Endpoints/ (allocs/op) 102,373 allocs 102,369 allocs ⚪ 0%
Send_100_Webhooks_to_100_Endpoints/ (ns/op) 1.24 s 1.24 s 🔴 +0.16%
Send_100_Webhooks_to_100_Endpoints/ (B/op) 82.37 MB 82.40 MB 🔴 +0.04%
Send_100_Webhooks_to_100_Endpoints/ (allocs/op) 1,022,415 allocs 1,022,336 allocs ⚪ 0%
Send_10_Webhooks_to_1000_Endpoints/ (ns/op) 2.72 s 2.78 s 🔴 +2.23%
Send_10_Webhooks_to_1000_Endpoints/ (B/op) 209.69 MB 209.73 MB 🔴 +0.02%
Send_10_Webhooks_to_1000_Endpoints/ (allocs/op) 1,716,664 allocs 1,716,623 allocs ⚪ 0%
BenchmarkWebhookWithLimit
Benchmark suite Previous Current Change
Send_10_Webhooks_to_10_Endpoints_with_limit/ (ns/op) 3.71 ms 3.80 ms 🔴 +2.51%
Send_10_Webhooks_to_10_Endpoints_with_limit/ (B/op) 306.44 KB 306.51 KB 🔴 +0.02%
Send_10_Webhooks_to_10_Endpoints_with_limit/ (allocs/op) 2,913 allocs 2,913 allocs ⚪ 0%
Send_100_Webhooks_to_10_Endpoints_with_limit/ (ns/op) 4.00 ms 4.03 ms 🔴 +0.69%
Send_100_Webhooks_to_10_Endpoints_with_limit/ (B/op) 428.91 KB 428.92 KB ⚪ 0%
Send_100_Webhooks_to_10_Endpoints_with_limit/ (allocs/op) 4,714 allocs 4,714 allocs ⚪ 0%
Send_10_Webhooks_to_100_Endpoints_with_limit/ (ns/op) 37.27 ms 37.90 ms 🔴 +1.67%
Send_10_Webhooks_to_100_Endpoints_with_limit/ (B/op) 3.08 MB 3.08 MB 🟢 -0.03%
Send_10_Webhooks_to_100_Endpoints_with_limit/ (allocs/op) 29,178 allocs 29,173 allocs 🟢 -0.02%
Send_100_Webhooks_to_100_Endpoints_with_limit/ (ns/op) 40.00 ms 40.70 ms 🔴 +1.77%
Send_100_Webhooks_to_100_Endpoints_with_limit/ (B/op) 4.37 MB 4.37 MB ⚪ 0%
Send_100_Webhooks_to_100_Endpoints_with_limit/ (allocs/op) 47,182 allocs 47,178 allocs ⚪ 0%
Send_10_Webhooks_to_1000_Endpoints_with_limit/ (ns/op) 362.80 ms 366.41 ms 🔴 +0.99%
Send_10_Webhooks_to_1000_Endpoints_with_limit/ (B/op) 44.50 MB 44.52 MB 🔴 +0.06%
Send_10_Webhooks_to_1000_Endpoints_with_limit/ (allocs/op) 380,122 allocs 380,176 allocs 🔴 +0.01%

Lock-free approach eliminated write lock contention. However, waiting
shifted to MongoDB Driver level causing unexpected CPU overhead.

This commit restores push-lock for immediate performance recovery.
@hackerwins hackerwins force-pushed the rollback-push-lock branch from 7bc2ac3 to 48952e6 Compare June 11, 2025 03:02
@hackerwins hackerwins merged commit 923df10 into main Jun 11, 2025
6 checks passed
@hackerwins hackerwins deleted the rollback-push-lock branch June 11, 2025 05:59
hackerwins added a commit that referenced this pull request Jun 11, 2025
Lock-free approach eliminated write lock contention. However, waiting
shifted to MongoDB Driver level causing unexpected CPU overhead.

This commit restores push-lock for immediate performance recovery.
@coderabbitai coderabbitai Bot mentioned this pull request Sep 17, 2025
3 tasks
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