Mercurial > code > home > repos > light9
diff bin/patchserver @ 2046:9aa046cc9b33
replace greplin with prometheus throughout (untested)
author | drewp@bigasterisk.com |
---|---|
date | Tue, 10 May 2022 23:01:26 -0700 |
parents | 3d28b1a54a29 |
children |
line wrap: on
line diff
--- a/bin/patchserver Mon May 09 23:18:39 2022 -0700 +++ b/bin/patchserver Tue May 10 23:01:26 2022 -0700 @@ -12,7 +12,6 @@ import time import treq import cyclone.web, cyclone.websocket, cyclone.httpclient -from greplin import scales from cycloneerr import PrettyErrorHandler @@ -20,12 +19,10 @@ from light9 import networking, showconfig from rdfdb.syncedgraph import SyncedGraph -from greplin.scales.cyclonehandler import StatsHandler from light9.effect.settings import DeviceSettings from rdfdb.patch import Patch +from light9.metrics import metrics, metricsRoute -stats = scales.collection('/webServer', scales.PmfStat('setAttr', - recalcPeriod=1)) def launch(graph): @@ -37,9 +34,7 @@ "path": "light9/web", "default_filename": "patchServer.html" }), - (r'/stats/(.*)', StatsHandler, { - 'serverName': 'patchServer' - }), + metricsRoute(), ]), interface='::', )