[Example] Limit telemetry responses to 5000 records

Update example telemetry providers to limit the number of
datums generated so that queries for long time ranges will
not cause undesired behavior in demos.
This commit is contained in:
Pete Richards 2017-08-15 14:26:55 -07:00
parent 82a661b884
commit 5243b3748d
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@
var data = [];
for (; nextStep < end; nextStep += step) {
for (; nextStep < end && data.length < 5000; nextStep += step) {
data.push({
utc: nextStep,
yesterday: nextStep - 60*60*24*1000,

View File

@ -79,7 +79,7 @@ define([
var start = options.start;
var end = options.end;
var data = [];
while (start < end) {
while (start < end && data.length < 5000) {
data.push(pointForTimestamp(start));
start += 5000;
}