Mercurial > code > home > repos > homeauto
diff service/arduinoNode/devices.py @ 1424:458355ee1b99
arduinonode: per-device-type timing stats
Ignore-this: de560ed6044cef5dacbf5d9b6334df99
darcs-hash:c0164f22d20b5673d1f42ffa4462ef4ed87b608d
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Wed, 07 Aug 2019 20:55:00 -0700 |
parents | f349fe25789c |
children | 4880a9868673 |
line wrap: on
line diff
--- a/service/arduinoNode/devices.py Wed Aug 07 20:23:04 2019 -0700 +++ b/service/arduinoNode/devices.py Wed Aug 07 20:55:00 2019 -0700 @@ -4,7 +4,8 @@ from rdflib import Namespace, RDF, URIRef, Literal import time -sys.path.append('../../lib') +from greplin import scales + from devices_shared import RgbPixelsAnimation ROOM = Namespace('http://projects.bigasterisk.com/room/') @@ -41,6 +42,11 @@ # subclasses may add args to this def __init__(self, graph, uri, pinNumber): + scales.init(self, self.__class__.__name__) + self._stats = scales.collection(self.__class__.__name__, + scales.PmfStat('poll'), + scales.PmfStat('output'), + ) self.graph, self.uri = graph, uri self.pinNumber = pinNumber self.hostStateInit()