mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 21:30:16 +02:00
fix tests
This commit is contained in:
parent
9b5252d54c
commit
b0e7d4d5df
1 changed files with 3 additions and 2 deletions
|
@ -9,10 +9,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/schollz/croc/v9/src/models"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const TCP_BUFFER_SIZE = 1024 * 64
|
||||||
|
|
||||||
var bigFileSize = 75000000
|
var bigFileSize = 75000000
|
||||||
|
|
||||||
func bigFile() {
|
func bigFile() {
|
||||||
|
@ -62,7 +63,7 @@ func BenchmarkMissingChunks(b *testing.B) {
|
||||||
bigFile()
|
bigFile()
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
MissingChunks("bigfile.test", int64(bigFileSize), models.TCP_BUFFER_SIZE/2)
|
MissingChunks("bigfile.test", int64(bigFileSize), TCP_BUFFER_SIZE/2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue