File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,17 @@ var (
263263 partSize = flag .Int64 ("part-size" , 10 , "part size in MB that will be used to upload file" )
264264)
265265
266+ // BenchmarkMinioPutObject measures the performance of uploading file on the Minio SDK level.
267+ // It allows specifying --file-size and --part-size flags.
268+ // Example that was used in the microbenchmarking tests:
269+ /*
270+ go test ./pbm/storage/mio -bench=BenchmarkMinioPutObject -run=^$ -v \
271+ -benchtime=5x \
272+ -cpu=1,2,4,8 \
273+ -benchmem \
274+ -file-size=500 \
275+ -part-size=100
276+ */
266277func BenchmarkMinioPutObject (b * testing.B ) {
267278 numThreds := uint (max (runtime .GOMAXPROCS (0 ), 1 ))
268279 fsize := * fileSize * 1024 * 1024
@@ -317,6 +328,18 @@ func BenchmarkMinioPutObject(b *testing.B) {
317328 }
318329}
319330
331+ // BenchmarkMinioStorageSave measures the performance of uploading file on the
332+ // PBM's storage interface level.
333+ // It allows specifying --file-size and --part-size flags.
334+ // Example that was used in the microbenchmarking tests:
335+ /*
336+ go test ./pbm/storage/mio -bench=BenchmarkMinioStorageSave -run=^$ -v \
337+ -benchtime=5x \
338+ -cpu=1,2,4,8 \
339+ -benchmem \
340+ -file-size=500 \
341+ -part-size=100
342+ */
320343func BenchmarkMinioStorageSave (b * testing.B ) {
321344 numThreds := uint (max (runtime .GOMAXPROCS (0 ), 1 ))
322345 fsize := * fileSize * 1024 * 1024
Original file line number Diff line number Diff line change @@ -252,6 +252,17 @@ var (
252252 partSize = flag .Int64 ("part-size" , 10 , "part size that will be used to upload file" )
253253)
254254
255+ // BenchmarkS3Upload measures the performance of uploading file on the AWS S3 SDK level.
256+ // It allows specifying --file-size and --part-size flags.
257+ // Example that was used in the microbenchmarking tests:
258+ /*
259+ go test ./pbm/storage/s3 -bench=BenchmarkS3Upload -run=^$ -v \
260+ -benchtime=5x \
261+ -cpu=1,2,4,8 \
262+ -benchmem \
263+ -file-size=500 \
264+ -part-size=100
265+ */
255266func BenchmarkS3Upload (b * testing.B ) {
256267 numThreds := max (runtime .GOMAXPROCS (0 ), 1 )
257268 fsize := * fileSize * 1024 * 1024
@@ -308,6 +319,18 @@ func BenchmarkS3Upload(b *testing.B) {
308319 }
309320}
310321
322+ // BenchmarkS3StorageSave measures the performance of uploading file on the
323+ // PBM's storage interface level.
324+ // It allows specifying --file-size and --part-size flags.
325+ // Example that was used in the microbenchmarking tests:
326+ /*
327+ go test ./pbm/storage/s3 -bench=BenchmarkS3StorageSave -run=^$ -v \
328+ -benchtime=5x \
329+ -cpu=1,2,4,8 \
330+ -benchmem \
331+ -file-size=500 \
332+ -part-size=100
333+ */
311334func BenchmarkS3StorageSave (b * testing.B ) {
312335 numThreds := max (runtime .GOMAXPROCS (0 ), 1 )
313336 fsize := * fileSize * 1024 * 1024
You can’t perform that action at this time.
0 commit comments