Mercurial > code > home > repos > rdfdb
changeset 71:8a60c172a14c
use standardservice to serve cpu/ram stats
Ignore-this: 425713e20aa4fb79b82dfd77b08ef4b0
author | drewp@bigasterisk.com |
---|---|
date | Fri, 07 Jun 2019 00:03:20 +0000 |
parents | 04bd89cd9cf0 |
children | 8bf24d5a0d21 |
files | rdfdb/service.py setup.py |
diffstat | 2 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/rdfdb/service.py Sat Jun 01 20:04:31 2019 +0000 +++ b/rdfdb/service.py Fri Jun 07 00:03:20 2019 +0000 @@ -15,15 +15,9 @@ from rdfdb.graphfile import GraphFile, PatchCb, GetSubgraph from rdfdb.patch import Patch, ALLSTMTS from rdfdb.rdflibpatch import patchQuads +from standardservice.scalessetup import gatherProcessStats -# move this out -procStats = scales.collection('/process', - scales.DoubleStat('time'), -) -def updateTimeStat(): - procStats.time = round(time.time(), 3) -task.LoopingCall(updateTimeStat).start(.2) - +gatherProcessStats() stats = scales.collection('/webServer', scales.IntStat('clients'), scales.IntStat('liveClients'),
--- a/setup.py Sat Jun 01 20:04:31 2019 +0000 +++ b/setup.py Fri Jun 07 00:03:20 2019 +0000 @@ -11,7 +11,8 @@ 'treq', 'rdflib-jsonld', 'service_identity', - "autobahn", + 'autobahn', + 'standardservice', # from --index-url https://projects.bigasterisk.com/ 'scales', # use git+http://github.com/drewp/scales.git@master#egg=scales ], url='https://projects.bigasterisk.com/rdfdb/rdfdb-0.19.0.tar.gz',