forked from Silverfish/proton-bridge
GODT-2085: Ensure minimum sync worker count
Make sure that we are at least using 16 workers for sync, otherwise multiply the current sync worker count by 2. Finally, this patch also logs the duration of the time it takes to transfer all the messages from the server.
This commit is contained in:
@ -18,7 +18,6 @@
|
||||
package vault_test
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/Masterminds/semver/v3"
|
||||
@ -222,6 +221,7 @@ func TestVault_Settings_SyncWorkers(t *testing.T) {
|
||||
// create a new test vault.
|
||||
s := newVault(t)
|
||||
|
||||
require.Equal(t, runtime.NumCPU(), s.SyncWorkers())
|
||||
require.Equal(t, runtime.NumCPU(), s.SyncAttPool())
|
||||
syncWorkers := vault.GetDefaultSyncWorkerCount()
|
||||
require.Equal(t, syncWorkers, s.SyncWorkers())
|
||||
require.Equal(t, syncWorkers, s.SyncAttPool())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user