fix(syncthing): only perform CPU benchmark on startup when logging enabled, and on goroutine (#10398)
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl> Co-authored-by: bt90 <btom1990@googlemail.com>
This commit is contained in:
co-authored by
bt90
parent
a64c5396e9
commit
eb4eb7524d
@@ -162,8 +162,12 @@ func (a *App) startup() error {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
perf := ur.CpuBench(context.Background(), 3, 150*time.Millisecond)
|
if slog.Default().Enabled(context.Background(), slog.LevelInfo) {
|
||||||
slog.Info("Measured hashing performance", "perf", fmt.Sprintf("%.02f MB/s", perf))
|
go func() {
|
||||||
|
perf := ur.CpuBench(context.Background(), 3, 150*time.Millisecond)
|
||||||
|
slog.Info("Measured hashing performance", "perf", fmt.Sprintf("%.02f MB/s", perf))
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
if a.opts.ResetDeltaIdxs {
|
if a.opts.ResetDeltaIdxs {
|
||||||
slog.Info("Reinitializing delta index IDs")
|
slog.Info("Reinitializing delta index IDs")
|
||||||
|
|||||||
Reference in New Issue
Block a user