Use random time stamps

Don't remember what I wanted to test there ...
This commit is contained in:
Peter J. Holzer 2023-08-18 21:14:15 +02:00
parent 206be6a8fa
commit 3f21122769
1 changed files with 6 additions and 4 deletions

View File

@ -1,20 +1,22 @@
#!/usr/bin/python3 #!/usr/bin/python3
import time
import random
from ltsdb_json import LTS from ltsdb_json import LTS
ts1 = LTS({"hostname": "rorschach.hjp.at", "measure": "uptime"}) ts1 = LTS({"hostname": "rorschach.hjp.at", "measure": "uptime"})
ts1.add(1661026122, 4) ts1.add(time.time(), 4 + random.random())
ts1.save() ts1.save()
ts1 = LTS({"hostname": "rorschach.hjp.at", "website": "i12e.hjp.at", "measure": "rtt"}) ts1 = LTS({"hostname": "rorschach.hjp.at", "website": "i12e.hjp.at", "measure": "rtt"})
ts1.add(1661026122, 0.06) ts1.add(time.time(), 0.06)
ts1.save() ts1.save()
ts1 = LTS({"hostname": "rorschach.hjp.at", "measure": "uptime"}) ts1 = LTS({"hostname": "rorschach.hjp.at", "measure": "uptime"})
ts1.add(1661026361, 5) ts1.add(time.time() + 240, 5 + random.random())
ts1.save() ts1.save()
ts1 = LTS({"hostname": "charly.wsr.ac.at", "website": "www.wifo.ac.at", "measure": "rtt"}) ts1 = LTS({"hostname": "charly.wsr.ac.at", "website": "www.wifo.ac.at", "measure": "rtt"})
ts1.add(1661026122, 0.347) ts1.add(time.time(), 0.347)
ts1.save() ts1.save()