1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

Log duration of refresh

This commit is contained in:
Jesse Duffield 2023-07-29 09:37:14 +10:00
parent 6be9109aaa
commit 09ce430240

View File

@ -4,6 +4,7 @@ import (
"fmt"
"strings"
"sync"
"time"
"github.com/jesseduffield/generics/set"
"github.com/jesseduffield/generics/slices"
@ -51,6 +52,11 @@ func NewRefreshHelper(
}
func (self *RefreshHelper) Refresh(options types.RefreshOptions) error {
t := time.Now()
defer func() {
self.c.Log.Infof(fmt.Sprintf("Refresh took %s", time.Since(t)))
}()
if options.Scope == nil {
self.c.Log.Infof(
"refreshing all scopes in %s mode",