My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""Configuration."""

import logging
import os
import re
import sys

from google.appengine.ext.appstats import recording

logging.info('Loading %s from %s', __name__, __file__)

# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
# If reenabling appstats, do not forget to reeanble it in app.yaml too.
#app = recording.appstats_wsgi_middleware(app)
return app

# Custom Appstats path normalization.
def appstats_normalize_path(path):
if path.startswith('/user/'):
return '/user/X'
if path.startswith('/user_popup/'):
return '/user_popup/X'
if '/diff/' in path:
return '/X/diff/...'
if '/diff2/' in path:
return '/X/diff2/...'
if '/patch/' in path:
return '/X/patch/...'
if path.startswith('/rss/'):
i = path.find('/', 5)
if i > 0:
return path[:i] + '/X'
return re.sub(r'\d+', 'X', path)

# Segregate Appstats by runtime (python vs. python27).
appstats_KEY_NAMESPACE = '__appstats_%s__' % os.getenv('APPENGINE_RUNTIME')

# Enable Interactive Playground.
appstats_SHELL_OK = True

# Enable RPC cost calculation.
appstats_CALC_RPC_COSTS = True

# Enable third-party imports
sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))

Change log

228f490cff64 by Marc-Antoine Ruel <mar...@chromium.org> on Sep 4, 2013   Diff
Disable appstats

Review:
https://codereview.appspot.com/13529044/
Go to: 
Project members, sign in to write a code review

Older revisions

2de2b777810d by Robert Iannucci <iannu...@chromium.org> on May 22, 2013   Diff
Improve speed of recent UI
improvements.

This moves calculation over
message_set's and Comments to the time
...
318844ab4d6d by Andi Albrecht <albrecht.andi> on Apr 17, 2013   Diff
Final server side changes to make
OAuth 2.0 work with upload.py, by
dhermes.

Review: https://codereview.appspot.com
...
4ca10adb8024 by Guido van Rossum <gu...@google.com> on Nov 17, 2012   Diff
Enable RPC cost calculations in
Appstats.
All revisions of this file

File info

Size: 1268 bytes, 46 lines
Powered by Google Project Hosting