diff --git a/bin/vidref b/bin/vidref --- a/bin/vidref +++ b/bin/vidref @@ -19,8 +19,8 @@ from run_local import log from typing import cast import logging, optparse, json, base64, os, glob -from greplin import scales -from greplin.scales.cyclonehandler import StatsHandler +# from greplin import scales +# from greplin.scales.cyclonehandler import StatsHandler from rdflib import URIRef from twisted.internet import reactor, defer import cyclone.web, cyclone.httpclient, cyclone.websocket @@ -30,7 +30,7 @@ from light9 import networking, showconfi from light9.newtypes import Song from light9.vidref import videorecorder from rdfdb.syncedgraph import SyncedGraph -from standardservice.scalessetup import gatherProcessStats +# from standardservice.scalessetup import gatherProcessStats parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", help="logging.DEBUG") @@ -38,12 +38,12 @@ parser.add_option("-v", "--verbose", act log.setLevel(logging.DEBUG if options.verbose else logging.INFO) -gatherProcessStats() -stats = scales.collection( - '/webServer', - scales.RecentFpsStat('liveWebsocketFrameFps'), - scales.IntStat('liveClients'), -) +# gatherProcessStats() +# stats = scales.collection( +# '/webServer', +# scales.RecentFpsStat('liveWebsocketFrameFps'), +# scales.IntStat('liveClients'), +# ) class Snapshot(cyclone.web.RequestHandler): @@ -78,16 +78,17 @@ class Live(cyclone.websocket.WebSocketHa def connectionMade(self, *args, **kwargs): pipeline.liveImages.subscribe(on_next=self.onFrame) - stats.liveClients += 1 + # stats.liveClients += 1 def connectionLost(self, reason): #self.subj.dispose() - stats.liveClients -= 1 + # stats.liveClients -= 1 + pass def onFrame(self, cf: videorecorder.CaptureFrame): if cf is None: return - stats.liveWebsocketFrameFps.mark() + # stats.liveWebsocketFrameFps.mark() self.sendMessage( json.dumps({ @@ -188,9 +189,9 @@ reactor.listenTCP( }), (r'/time', Time), (r'/time/stream', TimeStream), - (r'/stats/(.*)', StatsHandler, { - 'serverName': 'vidref' - }), + # (r'/stats/(.*)', StatsHandler, { + # 'serverName': 'vidref' + # }), ], debug=True, ))