Skip to content

Commit

Permalink
Merge pull request #20 from MichaelMure/fix-getsize
Browse files Browse the repository at this point in the history
fix GetSize calls reported as Has
  • Loading branch information
Stebalien authored Aug 30, 2019
2 parents 7bcedfd + a555590 commit 073634f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion measure.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,11 @@ func (m *measure) Has(key datastore.Key) (exists bool, err error) {

func (m *measure) GetSize(key datastore.Key) (size int, err error) {
defer recordLatency(m.getsizeLatency, time.Now())
m.hasNum.Inc()
m.getsizeNum.Inc()
size, err = m.backend.GetSize(key)
switch err {
case nil, datastore.ErrNotFound:
// Not really an error.
default:
m.getsizeErr.Inc()
}
Expand Down

0 comments on commit 073634f

Please sign in to comment.