Exemplo n.º 1
0
	def __call__(self, environ, start_response):
		response_body = []

		def catching_start_response(status, headers):
			start_response(status, headers)
			return response_body.append

		def runapp():
			appiter = self.app(environ, catching_start_response)
			response_body.extend(appiter)
			if hasattr(appiter, 'close'):
				appiter.close()

		gevent_profiler.profile(runapp)
		body = ''.join(response_body)
		return [body]
Exemplo n.º 2
0
    def __call__(self, environ, start_response):
        response_body = []

        def catching_start_response(status, headers):
            start_response(status, headers)
            return response_body.append

        def runapp():
            appiter = self.app(environ, catching_start_response)
            response_body.extend(appiter)
            if hasattr(appiter, 'close'):
                appiter.close()

        gevent_profiler.profile(runapp)
        body = ''.join(response_body)
        return [body]
Exemplo n.º 3
0
def gevent_profiler__prof_call(func, *args):
    import gevent_profiler
    return gevent_profiler.profile(func, *args)
Exemplo n.º 4
0
 def runner(result):
     gevent_profiler.profile(test, result)
Exemplo n.º 5
0
 def runner(result):
     gevent_profiler.profile(test, result)
Exemplo n.º 6
0
def gevent_profiler__prof_call(func, *args):
    import gevent_profiler
    return gevent_profiler.profile(func, *args)