METRCIS→METRICS
This commit is contained in:
parent
9279e03636
commit
bf9d113677
6 changed files with 19 additions and 14 deletions
|
@ -81,8 +81,9 @@ def api_etag(permissions=True, etag_func=AccessPermission.etag_func, base_mapdat
|
|||
|
||||
|
||||
def api_stats(stat_name):
|
||||
from c3nav.mapdata.metrics import APIStatsCollector
|
||||
APIStatsCollector.add_stat(stat_name, ['by', 'query'])
|
||||
if settings.METRICS:
|
||||
from c3nav.mapdata.metrics import APIStatsCollector
|
||||
APIStatsCollector.add_stat(stat_name, ['by', 'query'])
|
||||
def wrapper(func):
|
||||
@wraps(func)
|
||||
def wrapped_func(request, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue