mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 08:00:53 +00:00
Allow creation of a 'subspace' within a Metrics object, returning another one
This commit is contained in:
parent
e438699c59
commit
ccc1a3d54d
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue