Comparing version 0.2.2 to 0.2.3
@@ -68,4 +68,5 @@ var endpoint = require("./endpoint"), | ||
// Provide default start and stop times for recent metrics. | ||
// Provide default start, stop and step times for recent metrics. | ||
// If the limit is not specified, or too big, use the maximum limit. | ||
if (!("step" in request)) request.step = step = 1e4; | ||
if (!("stop" in request)) request.stop = Math.floor(Date.now() / step) * step; | ||
@@ -72,0 +73,0 @@ if (!("start" in request)) request.start = 0; |
@@ -8,3 +8,4 @@ // TODO include the event._id (and define a JSON encoding for ObjectId?) | ||
types = require("./types"), | ||
bisect = require("./bisect"); | ||
bisect = require("./bisect"), | ||
ObjectID = mongodb.ObjectID; | ||
@@ -191,3 +192,3 @@ var type_re = /^[a-z][a-zA-Z0-9_]+$/, | ||
// A null event indicates that there are no more results. | ||
if (event) callback({time: event.t, data: event.d}); | ||
if (event) callback({id: event._id instanceof ObjectID ? undefined : event._id, time: event.t, data: event.d}); | ||
else callback(null); | ||
@@ -194,0 +195,0 @@ }); |
{ | ||
"name": "cube", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A system for analyzing time series data using MongoDB and Node.", | ||
@@ -5,0 +5,0 @@ "keywords": ["time series"], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
739922
18558