##// END OF EJS Templates
gunicorn: show total gunicorn execution time, and worker counter base on the gunicorn_conf.py
marcink -
r2538:81644cd5 default
parent child Browse files
Show More
@@ -119,16 +119,16 b' def child_exit(server, worker):'
119 119
120 120
121 121 def pre_request(worker, req):
122 return
123 worker.log.debug("[<%-10s>] PRE WORKER: %s %s",
124 worker.pid, req.method, req.path)
122 worker.start_time = time.time()
123 worker.log.debug(
124 "GNCRN PRE WORKER: %s %s", req.method, req.path)
125 125
126 126
127 127 def post_request(worker, req, environ, resp):
128 return
129 worker.log.debug("[<%-10s>] POST WORKER: %s %s resp: %s", worker.pid,
130 req.method, req.path, resp.status_code)
131
128 total_time = time.time() - worker.start_time
129 worker.log.debug(
130 "GNCRN POST WORKER [cnt:%s]: %s %s resp: %s, Load Time: %.3fs",
131 worker.nr, req.method, req.path, resp.status_code, total_time)
132 132
133 133
134 134 class RhodeCodeLogger(Logger):
General Comments 0
You need to be logged in to leave comments. Login now