mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
Benchmark syncing many vs large files
This commit is contained in:
parent
c2f367cf70
commit
515f0db5b4
@ -14,7 +14,15 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBenchmarkTransfer(t *testing.T) {
|
func TestBenchmarkTransferManyFiles(t *testing.T) {
|
||||||
|
benchmarkTransfer(t, 50000, 15)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBenchmarkTransferLargeFiles(t *testing.T) {
|
||||||
|
benchmarkTransfer(t, 200, 24)
|
||||||
|
}
|
||||||
|
|
||||||
|
func benchmarkTransfer(t *testing.T, files, sizeExp int) {
|
||||||
log.Println("Cleaning...")
|
log.Println("Cleaning...")
|
||||||
err := removeAll("s1", "s2", "h1/index*", "h2/index*")
|
err := removeAll("s1", "s2", "h1/index*", "h2/index*")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -22,7 +30,7 @@ func TestBenchmarkTransfer(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Println("Generating files...")
|
log.Println("Generating files...")
|
||||||
err = generateFiles("s1", 10000, 22, "../LICENSE")
|
err = generateFiles("s1", files, sizeExp, "../LICENSE")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user