a bit of debugging

This commit is contained in:
Alex Grintsvayg 2019-06-25 09:13:25 -04:00
parent dfb77d3547
commit ad1eea1e8e
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -3,6 +3,7 @@ package db
import ( import (
"context" "context"
"database/sql" "database/sql"
"time"
"github.com/lbryio/lbry.go/dht/bits" "github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors" "github.com/lbryio/lbry.go/extras/errors"
@ -121,7 +122,9 @@ func (s *SQL) HasBlobs(hashes []string) (map[string]bool, error) {
logQuery(query, args...) logQuery(query, args...)
err := func() error { err := func() error {
startTime := time.Now()
rows, err := s.conn.Query(query, args...) rows, err := s.conn.Query(query, args...)
log.Debugf("hashes query took %s", time.Since(startTime))
if err != nil { if err != nil {
return errors.Err(err) return errors.Err(err)
} }