Improve the s3 uploader for better performance.
Signed-off-by: dkkb <dabkb@aol.com>
This commit is contained in:
14
pkg/simple/client/s3/s3_test.go
Normal file
14
pkg/simple/client/s3/s3_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package s3
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
func TestCalculateConcurrency(t *testing.T) {
|
||||
assert.Equal(t, 5, calculateConcurrency(1*1024*1024))
|
||||
assert.Equal(t, 5, calculateConcurrency(5*1024*1024))
|
||||
assert.Equal(t, 20, calculateConcurrency(99*1024*1024))
|
||||
assert.Equal(t, 128, calculateConcurrency(129*5*1024*1024))
|
||||
}
|
||||
Reference in New Issue
Block a user