mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-02-13 09:21:21 -05:00
Allow creation of a 'subspace' within a Metrics object, returning another one
This commit is contained in:
parent
e438699c59
commit
ccc1a3d54d
@ -41,6 +41,9 @@ class Metrics(object):
|
|||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
self.name_prefix = name
|
self.name_prefix = name
|
||||||
|
|
||||||
|
def make_subspace(self, name):
|
||||||
|
return Metrics("%s_%s" % (self.name_prefix, name))
|
||||||
|
|
||||||
def register_collector(self, func):
|
def register_collector(self, func):
|
||||||
all_collectors.append(func)
|
all_collectors.append(func)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user