Merge pull request #601 from benbjohnson/stats-tx-n

Fix Stats.Sub() for Stats.TxN.
master
Ben Johnson 2016-10-03 13:08:47 -06:00 committed by GitHub
commit f0d021274d
1 changed files with 1 additions and 1 deletions

2
db.go
View File

@ -952,7 +952,7 @@ func (s *Stats) Sub(other *Stats) Stats {
diff.PendingPageN = s.PendingPageN diff.PendingPageN = s.PendingPageN
diff.FreeAlloc = s.FreeAlloc diff.FreeAlloc = s.FreeAlloc
diff.FreelistInuse = s.FreelistInuse diff.FreelistInuse = s.FreelistInuse
diff.TxN = other.TxN - s.TxN diff.TxN = s.TxN - other.TxN
diff.TxStats = s.TxStats.Sub(&other.TxStats) diff.TxStats = s.TxStats.Sub(&other.TxStats)
return diff return diff
} }