mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 11:28:59 +00:00
90b70c7a16
This introduces a better set of defaults for large databases. I've experimentally determined that it results in much better throughput in a couple of scenarios with large databases, but I can't give any guarantees the values are always optimal. They're probably no worse than the defaults though.
27 lines
703 B
Go
27 lines
703 B
Go
// Copyright (C) 2019 The Syncthing Authors.
|
|
//
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
package config_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/syncthing/syncthing/lib/config"
|
|
"github.com/syncthing/syncthing/lib/db"
|
|
)
|
|
|
|
func TestTuningMatches(t *testing.T) {
|
|
if int(config.TuningAuto) != int(db.TuningAuto) {
|
|
t.Error("mismatch for TuningAuto")
|
|
}
|
|
if int(config.TuningSmall) != int(db.TuningSmall) {
|
|
t.Error("mismatch for TuningSmall")
|
|
}
|
|
if int(config.TuningLarge) != int(db.TuningLarge) {
|
|
t.Error("mismatch for TuningLarge")
|
|
}
|
|
}
|