]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/restful/api/perf.py
1 from pecan
import expose
, request
, response
2 from pecan
.rest
import RestController
4 from restful
import context
5 from restful
.decorators
import auth
, lock
, paginate
9 class Perf(RestController
):
10 @expose(template
='json')
13 def get(self
, **kwargs
):
15 List all the available performance counters
18 - 'daemon' -- filter by daemon, accepts Python regexp
21 counters
= context
.instance
.get_unlabeled_perf_counters()
23 if 'daemon' in kwargs
:
24 _re
= re
.compile(kwargs
['daemon'])
25 counters
= {k
: v
for k
, v
in counters
.items() if _re
.match(k
)}