mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 13:41:28 +00:00
16 lines
379 B
Python
16 lines
379 B
Python
import uwsgi
|
|
import time
|
|
|
|
def application(env, start_response):
|
|
counter = 0
|
|
start_response( '200 OK', [ ('Content-Type','text/html') ])
|
|
start_time = time.time()
|
|
for i in range(1,100000):
|
|
uwsgi.suspend()
|
|
# print every 100
|
|
if i % 100 == 0:
|
|
yield "<h1>%d</h1>\n" % i
|
|
counter = counter + i
|
|
|
|
yield "<h1>%d cycles after %d</h1>\n" % (counter, time.time() - start_time)
|