Skip to content
Browse files

Fix off-by-one (or two) in GET metrics.

Fixes the computation of the expected number of metric values.
  • Loading branch information...
1 parent 4e8b01d commit 6c47292d23601ac9ac9e7f70443dfa8ff572a814 @mbostock mbostock committed Jan 26, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/cube/server/metric.js
  2. +1 −1 package.json
View
2 lib/cube/server/metric.js
@@ -299,7 +299,7 @@ exports.getter = function(db) {
// Return the expected number of values.
var expected = 0;
- while ((start = tier.step(start)) < stop) ++expected;
+ while (start < stop) ++expected, start = tier.step(start);
return expected;
};
};
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "cube",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "A system for time series visualization using MongoDB, Node and D3.",
"keywords": ["time series", "visualization"],
"homepage": "http://square.github.com/cube/",

0 comments on commit 6c47292

Please sign in to comment.
Something went wrong with that request. Please try again.