Skip to content

GODRIVER-2901 Refactor operation.Execute#2451

Draft
matthewdale wants to merge 3 commits into
mongodb:masterfrom
matthewdale:godriver2901-refactor-op-execute
Draft

GODRIVER-2901 Refactor operation.Execute#2451
matthewdale wants to merge 3 commits into
mongodb:masterfrom
matthewdale:godriver2901-refactor-op-execute

Conversation

@matthewdale

Copy link
Copy Markdown
Contributor

Summary

Background & Motivation

Pull the single round-trip work (maxTimeMS calculation, wire message
construction, APM event publishing, compression, CSOT deadline check,
and network round trip) out of Execute into a new executeAttempt method.
The new attemptResult type carries res, moreToCome, and processedBatches
back to the caller, replacing the now-removed local variables.
@mongodb-drivers-pr-bot

Copy link
Copy Markdown
Contributor

API Change Report

No changes found!

@mongodb-drivers-pr-bot

Copy link
Copy Markdown
Contributor

🧪 Performance Results

Commit SHA: 858b00a

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

Benchmark Measurement % Change Patch Value Stable Region H-Score Z-Score
BenchmarkMultiInsertLargeDocument total_mem_allocs -12.0655 1616.0000 Avg: 1837.7310
Med: 1842.0000
Stdev: 98.9240
0.7512 -2.2414
BenchmarkMultiInsertLargeDocument total_bytes_allocated -9.4515 921708472.0000 Avg: 1017917254.7619
Med: 1025990120.0000
Stdev: 44377700.5943
0.7434 -2.1680
BenchmarkLargeDocInsertOne total_mem_allocs -9.1345 441349.0000 Avg: 485716.9062
Med: 486337.0000
Stdev: 14533.2208
0.8151 -3.0529
BenchmarkLargeDocInsertOne total_bytes_allocated -8.9803 34348936.0000 Avg: 37737900.6027
Med: 37741424.0000
Stdev: 1082977.3558
0.8191 -3.1293
BenchmarkBSONFlatDocumentEncoding total_bytes_allocated -8.7803 492959544.0000 Avg: 540409284.1412
Med: 541483848.0000
Stdev: 14884141.2677
0.8252 -3.1879
BenchmarkBSONFlatDocumentEncoding total_mem_allocs -8.7764 238179.0000 Avg: 261093.5353
Med: 261670.5000
Stdev: 7125.4818
0.8268 -3.2159
BenchmarkLargeDocInsertOne total_time_seconds -7.6683 1.0918 Avg: 1.1825
Med: 1.1825
Stdev: 0.0242
0.8560 -3.7524
BenchmarkMultiInsertLargeDocument ns_per_op 6.2090 31300573.0000 Avg: 29470724.2275
Med: 29423434.0000
Stdev: 919615.0808
0.7350 1.9898
BenchmarkBSONFlatDocumentEncoding ns_per_op 5.4172 14587.0000 Avg: 13837.4000
Med: 13810.0000
Stdev: 367.9863
0.7393 2.0370
BenchmarkBSONFlatDocumentEncoding ops_per_second_med -5.2956 77712.1542 Avg: 82057.5683
Med: 82250.3707
Stdev: 2174.9671
0.7284 -1.9979
BenchmarkSmallDocInsertOne ns_per_op 5.1541 188532.0000 Avg: 179291.2329
Med: 178870.0000
Stdev: 3764.3062
0.7705 2.4548
BenchmarkBSONFullDocumentEncoding ns_per_op 4.3209 24176.0000 Avg: 23174.6529
Med: 23173.5000
Stdev: 403.5988
0.7791 2.4810
BenchmarkSmallDocInsertOne ops_per_second_med -4.2655 5618.5141 Avg: 5868.8495
Med: 5874.3017
Stdev: 122.7268
0.7224 -2.0398
BenchmarkMultiInsertLargeDocument allocated_bytes_per_op 4.1958 28803389.0000 Avg: 27643512.6395
Med: 27729461.0000
Stdev: 586336.2121
0.7312 1.9782
BenchmarkBSONFullDocumentEncoding total_mem_allocs -3.9880 1487772.0000 Avg: 1549569.6000
Med: 1551079.5000
Stdev: 26318.7263
0.7631 -2.3480
BenchmarkBSONFullDocumentEncoding total_bytes_allocated -3.9321 257531288.0000 Avg: 268072128.4706
Med: 268345040.0000
Stdev: 4522480.2768
0.7614 -2.3308
BenchmarkBSONFlatDocumentEncoding total_time_seconds -3.8411 1.1465 Avg: 1.1923
Med: 1.1931
Stdev: 0.0186
0.7796 -2.4590

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

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