add method timing logs

This commit is contained in:
Pascal Fischer
2024-04-25 14:15:36 +02:00
parent 7b254cb966
commit 8f8cfcbc20
6 changed files with 75 additions and 25 deletions

View File

@@ -2,6 +2,7 @@ package server
import (
"errors"
"time"
"github.com/google/martian/v3/log"
@@ -76,5 +77,11 @@ func (am *DefaultAccountManager) GroupValidation(accountId string, groups []stri
}
func (am *DefaultAccountManager) GetValidatedPeers(account *Account) (map[string]struct{}, error) {
startTime := time.Now()
defer func() {
duration := time.Since(startTime)
log.Debugf("GetValidatedPeers took %s", duration)
}()
return am.integratedPeerValidator.GetValidatedPeers(account.Id, account.Groups, account.Peers, account.Settings.Extra)
}