Mercurial > code > home > repos > light9
diff bin/collector_loadtest.py @ 2078:2c48e92ad5d3
make loadtest real enough to cause numbers to change on collector's web view
author | drewp@bigasterisk.com |
---|---|
date | Tue, 24 May 2022 01:21:32 -0700 |
parents | d5f1cc9615af |
children |
line wrap: on
line diff
--- a/bin/collector_loadtest.py Tue May 24 01:00:40 2022 -0700 +++ b/bin/collector_loadtest.py Tue May 24 01:21:32 2022 -0700 @@ -1,8 +1,9 @@ #!bin/python import asyncio import logging +import random +from rdflib import URIRef import time -from typing import cast from light9.collector.collector_client_asyncio import sendToCollector from light9.effect.settings import DeviceSettings @@ -15,7 +16,7 @@ async def loadTest(): print("scheduling loadtest") n = 200000 - period=1 + period=.02 times = [] session = "loadtest%s" % time.time() for i in range(n): @@ -28,15 +29,15 @@ DeviceSettings( graph=None, settingsList=[ - [DEV["backlight1"], L9["color"], "#ffffff"], # - [DEV["backlight2"], L9["color"], "#ffffff"], - [DEV["backlight3"], L9["color"], "#ffffff"], - [DEV["backlight4"], L9["color"], "#ffffff"], - [DEV["backlight5"], L9["color"], "#ffffff"], - [DEV["down2"], L9["color"], "#ffffff"], - [DEV["down3"], L9["color"], "#ffffff"], - [DEV["down4"], L9["color"], "#ffffff"], - [DEV["houseSide"], L9["level"], .8], + # [DEV["backlight1"], L9["color"], "#ffffff"], # + # [DEV["backlight2"], L9["color"], "#ffffff"], + # [DEV["backlight3"], L9["color"], "#ffffff"], + # [DEV["backlight4"], L9["color"], "#ffffff"], + # [DEV["backlight5"], L9["color"], "#ffffff"], + # [DEV["down2"], L9["color"], "#ffffff"], + # [DEV["down3"], L9["color"], "#ffffff"], + # [DEV["down4"], L9["color"], "#ffffff"], + [URIRef('http://light9.bigasterisk.com/theater/skyline/device/down1'), L9["brightness"], random.random()], [DEV["backlight5"], L9["uv"], 0.011] ])) times.append(time.time() - start)