Skip to content

Instantly share code, notes, and snippets.

@yumike
yumike / middleware.py
Last active August 23, 2018 14:29
cian-statprof
# coding: utf-8
from cian_statprof.profiler import Profiler
from cian_statprof.sampler import Sampler
profiler = Profiler(Sampler(), Logger(), {'is_enabled': True})
class StatisticalProfilerMiddleware(object):
def process_request(self, request):