1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-23 12:18:51 +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" "fmt"
"strings" "strings"
"sync" "sync"
"time"
"github.com/jesseduffield/generics/set" "github.com/jesseduffield/generics/set"
"github.com/jesseduffield/generics/slices" "github.com/jesseduffield/generics/slices"
@ -51,6 +52,11 @@ func NewRefreshHelper(
} }
func (self *RefreshHelper) Refresh(options types.RefreshOptions) error { 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 { if options.Scope == nil {
self.c.Log.Infof( self.c.Log.Infof(
"refreshing all scopes in %s mode", "refreshing all scopes in %s mode",