mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04: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):
|
||||
self.name_prefix = name
|
||||
|
||||
def make_subspace(self, name):
|
||||
return Metrics("%s_%s" % (self.name_prefix, name))
|
||||
|
||||
def register_collector(self, func):
|
||||
all_collectors.append(func)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user