Permalink
Browse files

Use a default step of 10 seconds.

  • Loading branch information...
1 parent ccea66b commit e42488f808ecf0a410319301ce752e88a56abe8f @mbostock mbostock committed May 15, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/cube/evaluator.js
View
@@ -65,8 +65,9 @@ exports.register = function(db, endpoints) {
limit = +request.limit,
step = +request.step;
- // 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;
if (!("start" in request)) request.start = 0;
if (!(limit <= limitMax)) limit = limitMax;

0 comments on commit e42488f

Please sign in to comment.