diff --git a/management/server/peer.go b/management/server/peer.go index 5c9136cb2..8a080eea3 100644 --- a/management/server/peer.go +++ b/management/server/peer.go @@ -541,12 +541,6 @@ func (am *DefaultAccountManager) SyncPeer(sync PeerSync, account *Account) (*nbp // LoginPeer logs in or registers a peer. // If peer doesn't exist the function checks whether a setup key or a user is present and registers a new peer if so. func (am *DefaultAccountManager) LoginPeer(login PeerLogin) (*nbpeer.Peer, *NetworkMap, error) { - startTime := time.Now() - defer func() { - duration := time.Since(startTime) - log.Debugf("LoginPeer took %s", duration) - }() - account, err := am.Store.GetAccountByPeerPubKey(login.WireGuardPubKey) if err != nil { if errStatus, ok := status.FromError(err); ok && errStatus.Type() == status.NotFound { diff --git a/management/server/peer/peer.go b/management/server/peer/peer.go index 42efe40aa..e62843180 100644 --- a/management/server/peer/peer.go +++ b/management/server/peer/peer.go @@ -5,8 +5,6 @@ import ( "net" "net/netip" "time" - - log "github.com/sirupsen/logrus" ) // Peer represents a machine connected to the network. @@ -175,8 +173,6 @@ func (p *Peer) UpdateMetaIfNew(meta PeerSystemMeta) bool { meta.UIVersion = p.Meta.UIVersion } - log.Infof("Check if meta is equal: %v", p.Meta.isEqual(meta)) - if p.Meta.isEqual(meta) { return false } diff --git a/management/server/sqlite_store.go b/management/server/sqlite_store.go index 609d71cd2..044eae61e 100644 --- a/management/server/sqlite_store.go +++ b/management/server/sqlite_store.go @@ -479,12 +479,6 @@ func (s *SqliteStore) GetAccount(accountID string) (*Account, error) { } func (s *SqliteStore) GetAccountByUser(userID string) (*Account, error) { - startTime := time.Now() - defer func() { - duration := time.Since(startTime) - log.Debugf("GetAccountByUser took %s", duration) - }() - var user User result := s.db.Select("account_id").First(&user, "id = ?", userID) if result.Error != nil { @@ -503,11 +497,6 @@ func (s *SqliteStore) GetAccountByUser(userID string) (*Account, error) { } func (s *SqliteStore) GetAccountByPeerID(peerID string) (*Account, error) { - startTime := time.Now() - defer func() { - duration := time.Since(startTime) - log.Debugf("GetAccountByPeerID took %s", duration) - }() var peer nbpeer.Peer result := s.db.Select("account_id").First(&peer, "id = ?", peerID) if result.Error != nil { @@ -526,12 +515,6 @@ func (s *SqliteStore) GetAccountByPeerID(peerID string) (*Account, error) { } func (s *SqliteStore) GetAccountByPeerPubKey(peerKey string) (*Account, error) { - startTime := time.Now() - defer func() { - duration := time.Since(startTime) - log.Debugf("GetAccountByPubKey took %s", duration) - }() - var peer nbpeer.Peer result := s.db.Select("account_id").First(&peer, "key = ?", peerKey) @@ -551,12 +534,6 @@ func (s *SqliteStore) GetAccountByPeerPubKey(peerKey string) (*Account, error) { } func (s *SqliteStore) GetAccountIDByPeerPubKey(peerKey string) (string, error) { - startTime := time.Now() - defer func() { - duration := time.Since(startTime) - log.Debugf("GetAccountByPubKey took %s", duration) - }() - var peer nbpeer.Peer var accountID string result := s.db.Model(&peer).Select("account_id").Where("key = ?", peerKey).First(&accountID) @@ -573,12 +550,6 @@ func (s *SqliteStore) GetAccountIDByPeerPubKey(peerKey string) (string, error) { // SaveUserLastLogin stores the last login time for a user in DB. func (s *SqliteStore) SaveUserLastLogin(accountID, userID string, lastLogin time.Time) error { - startTime := time.Now() - defer func() { - duration := time.Since(startTime) - log.Debugf("SaveUserLastLogin took %s", duration) - }() - var user User result := s.db.First(&user, "account_id = ? and id = ?", accountID, userID)