go-mongodb-bulk-vs-single-upsert

command module
v0.0.0-...-9c227f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 6 Imported by: 0

README

Go MongoDB Bulk vs Single Upsert

Usage

通常実行
make run
ベンチマーク測定
make benchmark

実行結果

グラフ

BulkWriteの使用有無による速度比較

生データ
Count Upsert [ms] Upsert with Ordered BulkWrite [ms] Upsert with Unordered BulkWrite [ms]
2 2.133208 0.581792 0.737958
10 2.286875 0.735333 0.656709
500 124.608417 6.619916 7.261834
1000 258.089375 13.670375 14.147833
5000 1196.438875 60.213167 55.745958
10000 2545.017291 109.007875 115.019000
25000 6197.190708 266.358584 258.589292
50000 12572.662542 513.233917 505.818833
60000 15046.596667 612.842708 599.896833
75000 18971.093167 755.054333 749.736958
90000 22539.555708 895.445958 894.784875
100000 25164.902750 1000.472625 994.018500
125000 32281.964083 1287.898167 1246.446250
250000 62579.735958 2527.524084 2456.428584
500000 123283.775000 5011.075125 5003.532458
1000000 251076.988916 10238.443166 9967.259542

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL