Skip to content

Conversation

@FGasper
Copy link
Contributor

@FGasper FGasper commented Nov 27, 2025

GODRIVER-3713

Summary

This adds a simple accessor to fetch the Current document from a Cursor or ChangeStream.

Background & Motivation

This facilitates iteration of these cursor types via an interface.

@FGasper FGasper requested a review from a team as a code owner November 27, 2025 15:09
@FGasper FGasper requested a review from matthewdale November 27, 2025 15:09
@mongodb-drivers-pr-bot
Copy link
Contributor

🧪 Performance Results

Commit SHA: 35941cb

The following benchmark tests for version 692869af1b5f710007155424 had statistically significant changes (i.e., |z-score| > 1.96):

Benchmark Measurement % Change Patch Value Stable Region H-Score Z-Score
BenchmarkMultiFindMany total_bytes_allocated -16.4889 633456800.0000 Avg: 758530459.2000
Med: 765480688.0000
Stdev: 47137297.3803
0.7953 -2.6534
BenchmarkMultiFindMany total_mem_allocs -16.4408 390320.0000 Avg: 467117.8000
Med: 471050.0000
Stdev: 29057.9195
0.7938 -2.6429
BenchmarkMultiInsertSmallDocument total_mem_allocs 14.1909 2589917.0000 Avg: 2268058.3816
Med: 2237973.5000
Stdev: 118282.9988
0.8179 2.7211
BenchmarkMultiInsertLargeDocument ns_per_op 10.6423 32376706.0000 Avg: 29262512.6429
Med: 29016895.0000
Stdev: 882637.9610
0.8511 3.5283
BenchmarkMultiInsertSmallDocument total_bytes_allocated 10.3758 492827912.0000 Avg: 446499989.7582
Med: 445093368.0000
Stdev: 14484709.8802
0.8354 3.1984
BenchmarkMultiInsertSmallDocument total_time_seconds 10.1455 1.1682 Avg: 1.0606
Med: 1.0466
Stdev: 0.0460
0.7961 2.3397
BenchmarkSmallDocInsertOne ops_per_second_max -7.3652 5758.1132 Avg: 6215.9301
Med: 6245.5500
Stdev: 211.8155
0.7525 -2.1614
BenchmarkSingleRunCommand allocated_bytes_per_op 0.0933 12208.0000 Avg: 12196.6190
Med: 12196.0000
Stdev: 5.4755
0.7561 2.0785

For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch.

@mongodb-drivers-pr-bot
Copy link
Contributor

API Change Report

./v2/mongo

compatible changes

(*ChangeStream).CurrentRaw: added
(*Cursor).CurrentRaw: added

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