remove profiler
This commit is contained in:
parent
506b959946
commit
9c6a340df6
1 changed files with 0 additions and 11 deletions
|
@ -14,11 +14,6 @@ from c3nav.mapdata.render.svg import SVGRenderer
|
||||||
|
|
||||||
|
|
||||||
def tile(request, level, zoom, x, y, format):
|
def tile(request, level, zoom, x, y, format):
|
||||||
import cProfile
|
|
||||||
import pstats
|
|
||||||
pr = cProfile.Profile()
|
|
||||||
pr.enable()
|
|
||||||
|
|
||||||
zoom = int(zoom)
|
zoom = int(zoom)
|
||||||
if not (0 <= zoom <= 10):
|
if not (0 <= zoom <= 10):
|
||||||
raise Http404
|
raise Http404
|
||||||
|
@ -102,12 +97,6 @@ def tile(request, level, zoom, x, y, format):
|
||||||
f.write(update_cache_key)
|
f.write(update_cache_key)
|
||||||
cache.get(tile_cache_update_cache_key, update_cache_key, 60)
|
cache.get(tile_cache_update_cache_key, update_cache_key, 60)
|
||||||
|
|
||||||
pr.disable()
|
|
||||||
s = open('/tmp/profiled', 'w')
|
|
||||||
sortby = 'cumulative'
|
|
||||||
ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
|
|
||||||
ps.print_stats()
|
|
||||||
|
|
||||||
response = HttpResponse(data, content_type)
|
response = HttpResponse(data, content_type)
|
||||||
response['ETag'] = etag
|
response['ETag'] = etag
|
||||||
response['Cache-Control'] = 'no-cache'
|
response['Cache-Control'] = 'no-cache'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue