diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-07-15 07:26:02 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-07-15 07:26:02 -0600 |
commit | 6e977e2f19824f46ecc61c78e49b968fa0d34976 (patch) | |
tree | a0d4c3dd4428bc77ee76f8b04fe41345f5e0502a | |
parent | Remove unreachable test code. (diff) | |
download | dedo-6e977e2f19824f46ecc61c78e49b968fa0d34976.tar.gz dedo-6e977e2f19824f46ecc61c78e49b968fa0d34976.tar.xz |
Only update rebalance time if nodes are rebalanced.
This commit changes TxStats.RebalanceTime to only update if there are nodes that have been
rebalanced. Previously, the RebalanceTime would include a small amount of time to check if
there were nodes to rebalance but this is confusing to users and not terribly helpful.
-rw-r--r-- | tx.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -141,7 +141,9 @@ func (tx *Tx) Commit() error { // Rebalance nodes which have had deletions. var startTime = time.Now() tx.root.rebalance() - tx.stats.RebalanceTime += time.Since(startTime) + if tx.stats.Rebalance > 0 { + tx.stats.RebalanceTime += time.Since(startTime) + } // spill data onto dirty pages. startTime = time.Now() |