summaryrefslogtreecommitdiff
path: root/datastore-leveldb/bin/insert_testdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'datastore-leveldb/bin/insert_testdata.py')
-rw-r--r--datastore-leveldb/bin/insert_testdata.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/datastore-leveldb/bin/insert_testdata.py b/datastore-leveldb/bin/insert_testdata.py
index d1fd74a..6ea1180 100644
--- a/datastore-leveldb/bin/insert_testdata.py
+++ b/datastore-leveldb/bin/insert_testdata.py
@@ -10,7 +10,12 @@ s = ["heizkreisregler9.solarDaten.tempKollektor",
MINUTE = 1000 * 60
DAY = MINUTE * 60 * 24
NOW = long(time.time()*1000)
-for i in range(NOW-14*DAY, NOW, MINUTE):
+
+FROM=NOW-DAY*30
+TO=NOW
+STEP=MINUTE
+
+for i in range(FROM,TO,STEP):
for j,sensor in zip(range(len(s)),s):
x = (float(i)/DAY)+j
requests.put("http://localhost:8080/api/value/"+sensor+"/"+str(i),