Mercurial > code > home > repos > patchablegraph
comparison patchablegraph.py @ 20:8ec07d997cd5
declare labelnames on metrics
author | drewp@bigasterisk.com |
---|---|
date | Wed, 24 Nov 2021 20:29:32 -0800 |
parents | 388a5e15d249 |
children | 8d6ba6d372c8 |
comparison
equal
deleted
inserted
replaced
19:8b376bffa396 | 20:8ec07d997cd5 |
---|---|
41 from . import patch_cyclone | 41 from . import patch_cyclone |
42 | 42 |
43 patch_cyclone.patch_sse() | 43 patch_cyclone.patch_sse() |
44 log = logging.getLogger('patchablegraph') | 44 log = logging.getLogger('patchablegraph') |
45 | 45 |
46 SERIALIZE_CALLS = Summary('serialize_calls', 'PatchableGraph.serialize calls') | 46 SERIALIZE_CALLS = Summary('serialize_calls', 'PatchableGraph.serialize calls', labelnames=['graph']) |
47 PATCH_CALLS = Summary('patch_calls', 'PatchableGraph.patch calls') | 47 PATCH_CALLS = Summary('patch_calls', 'PatchableGraph.patch calls', labelnames=['graph']) |
48 STATEMENT_COUNT = Gauge('statement_count', 'current PatchableGraph graph size') | 48 STATEMENT_COUNT = Gauge('statement_count', 'current PatchableGraph graph size', labelnames=['graph']) |
49 OBSERVERS_CURRENT = Gauge('observers_current', 'current observer count') | 49 OBSERVERS_CURRENT = Gauge('observers_current', 'current observer count', labelnames=['graph']) |
50 OBSERVERS_ADDED = Counter('observers_added', 'observers added') | 50 OBSERVERS_ADDED = Counter('observers_added', 'observers added', labelnames=['graph']) |
51 | 51 |
52 | 52 |
53 # forked from /my/proj/light9/light9/rdfdb/rdflibpatch.py | 53 # forked from /my/proj/light9/light9/rdfdb/rdflibpatch.py |
54 def _graphFromQuads2(q): | 54 def _graphFromQuads2(q): |
55 g = ConjunctiveGraph() | 55 g = ConjunctiveGraph() |