Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 6c47292

Browse files
committed
Fix off-by-one (or two) in GET metrics.
Fixes the computation of the expected number of metric values.
1 parent 4e8b01d commit 6c47292

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/cube/server/metric.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ exports.getter = function(db) {
299299

300300
// Return the expected number of values.
301301
var expected = 0;
302-
while ((start = tier.step(start)) < stop) ++expected;
302+
while (start < stop) ++expected, start = tier.step(start);
303303
return expected;
304304
};
305305
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cube",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "A system for time series visualization using MongoDB, Node and D3.",
55
"keywords": ["time series", "visualization"],
66
"homepage": "http://square.github.com/cube/",

0 commit comments

Comments
 (0)