Skip to content

Conversation

qingyang-hu
Copy link
Collaborator

GODRIVER-3370

Summary

Add bypassEmptyTsReplacement option to:

  • insertOne
  • insertMany
  • updateOne
  • updateMany
  • replaceOne
  • findOneAndUpdate
  • findOneAndReplace
  • collection.bulkWrite
  • client.bulkWrite

Background & Motivation

Copy link
Contributor

🧪 Performance Results

Commit SHA: f42d087

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

Benchmark Measurement % Change Patch Value Stable Region H-Score Z-Score
BenchmarkBSONFlatDocumentDecoding ops_per_second_min -40.5774 1254.6878 Avg: 2111.4669
Med: 2209.4418
Stdev: 283.9228
0.8232 -3.0176
BenchmarkBSONDeepDocumentDecoding ns_per_op 16.5031 73256.0000 Avg: 62879.0000
Med: 62879.0000
Stdev: 741.0479
0.9748 14.0031
BenchmarkMultiFindMany ops_per_second_med -16.3021 3134796.2382 Avg: 3745370.8899
Med: 3745370.8899
Stdev: 19838.0311
0.9885 -30.7780
BenchmarkMultiFindMany ops_per_second_max -15.9589 3546099.2908 Avg: 4219484.4039
Med: 4219484.4039
Stdev: 25178.2788
0.9868 -26.7447
BenchmarkBSONDeepDocumentDecoding ops_per_second_med -15.0659 14424.3945 Avg: 16983.0433
Med: 16983.0433
Stdev: 376.6983
0.9479 -6.7923
BenchmarkBSONDeepDocumentDecoding ops_per_second_max -14.9008 14934.9583 Avg: 17550.0516
Med: 17550.0516
Stdev: 305.0804
0.9588 -8.5718
BenchmarkBSONFullDocumentDecoding ns_per_op 14.1297 84868.0000 Avg: 74361.0000
Med: 74361.0000
Stdev: 67.8823
0.9977 154.7827
BenchmarkBSONFullDocumentDecoding ops_per_second_med -13.8912 12567.5506 Avg: 14594.9582
Med: 14594.9582
Stdev: 123.1298
0.9785 -16.4656
BenchmarkBSONDeepDocumentDecoding total_mem_allocs -13.4028 11482523.0000 Avg: 13259700.5000
Med: 13259700.5000
Stdev: 147422.5715
0.9707 -12.0550
BenchmarkBSONDeepDocumentDecoding total_bytes_allocated -13.3733 249543656.0000 Avg: 288067960.0000
Med: 288067960.0000
Stdev: 3193961.7326
0.9707 -12.0616
BenchmarkBSONFullDocumentDecoding ops_per_second_max -13.1863 13194.8751 Avg: 15199.0668
Med: 15199.0668
Stdev: 58.4788
0.9897 -34.2721
BenchmarkBSONFlatDocumentDecoding ops_per_second_max -9.9275 19331.1425 Avg: 21461.7681
Med: 21461.7681
Stdev: 344.8704
0.9428 -6.1780
BenchmarkBSONFullDocumentEncoding ns_per_op 9.8740 25894.0000 Avg: 23567.0000
Med: 23567.0000
Stdev: 21.2132
0.9968 109.6958
BenchmarkBSONFullDocumentEncoding ops_per_second_max -9.7663 42725.9133 Avg: 47350.2788
Med: 47350.2788
Stdev: 412.1801
0.9685 -11.2193
BenchmarkBSONFullDocumentEncoding ops_per_second_med -9.7373 41416.4423 Avg: 45884.3582
Med: 45884.3582
Stdev: 334.9541
0.9735 -13.3389
BenchmarkBSONFullDocumentEncoding total_mem_allocs -9.3465 1377497.0000 Avg: 1519518.0000
Med: 1519518.0000
Stdev: 11602.2081
0.9711 -12.2409
BenchmarkBSONFlatDocumentDecoding ops_per_second_med -9.0977 18656.0203 Avg: 20523.1553
Med: 20523.1553
Stdev: 309.7114
0.9414 -6.0286
BenchmarkBSONFlatDocumentEncoding ops_per_second_max -9.0122 76184.6716 Avg: 83730.6417
Med: 83730.6417
Stdev: 2853.8031
0.8663 -2.6442
BenchmarkBSONFlatDocumentDecoding ns_per_op 8.4537 57269.0000 Avg: 52805.0000
Med: 52805.0000
Stdev: 1268.5496
0.8995 3.5190
BenchmarkBSONFlatDocumentDecoding total_bytes_allocated -8.1449 378567456.0000 Avg: 412135396.0000
Med: 412135396.0000
Stdev: 9247480.2590
0.9026 -3.6300
BenchmarkBSONFlatDocumentDecoding total_mem_allocs -8.1042 9629982.0000 Avg: 10479244.5000
Med: 10479244.5000
Stdev: 235634.1424
0.9019 -3.6042
BenchmarkBSONFlatDocumentEncoding ns_per_op 7.7263 15351.0000 Avg: 14250.0000
Med: 14250.0000
Stdev: 422.8499
0.8642 2.6038
BenchmarkSmallDocInsertOne allocated_bytes_per_op 0.6538 5696.0000 Avg: 5659.0000
Med: 5660.0000
Stdev: 6.4758
0.9049 5.7136
BenchmarkLargeDocInsertOne allocated_bytes_per_op 0.2888 5676.0000 Avg: 5659.6562
Med: 5660.0000
Stdev: 5.8398
0.8169 2.7987
BenchmarkSingleFindOneByID allocated_bytes_per_op 0.2173 22483.0000 Avg: 22434.2500
Med: 22433.0000
Stdev: 24.0336
0.7271 2.0284
BenchmarkBSONFlatDocumentDecoding allocated_bytes_per_op -0.0415 18045.0000 Avg: 18052.5000
Med: 18052.5000
Stdev: 0.7071
0.9667 -10.6066

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

Copy link
Contributor

API Change Report

./v2/x/mongo/driver/operation

compatible changes

(*FindAndModify).AdditionalCmd: added
(*Insert).AdditionalCmd: added
(*Update).AdditionalCmd: added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant