App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.ext.appstats.recording.ConfigDefaults Class Reference
Inheritance diagram for google.appengine.ext.appstats.recording.ConfigDefaults:

Public Member Functions

def should_record
 
def normalize_path
 
def extract_key
 

Static Public Attributes

 DEBUG = False
 
int DUMP_LEVEL = -1
 
tuple SHELL_OK = os.getenv('SERVER_SOFTWARE', '')
 
string DEFAULT_SCRIPT = "print 'Hello, world.'"
 
int KEY_DISTANCE = 100
 
int KEY_MODULUS = 1000
 
string KEY_NAMESPACE = '__appstats__'
 
string KEY_PREFIX = '__appstats__'
 
string KEY_TEMPLATE = ':%06d'
 
string PART_SUFFIX = ':part'
 
string FULL_SUFFIX = ':full'
 
string LOCK_SUFFIX = '<lock>'
 
int MAX_STACK = 10
 
int MAX_LOCALS = 10
 
int MAX_REPR = 100
 
int MAX_DEPTH = 10
 
string RE_STACK_BOTTOM = r'dev_appserver\.py'
 
string RE_STACK_SKIP = r'recording\.py|apiproxy_stub_map\.py'
 
int LOCK_TIMEOUT = 1
 
int TZOFFSET = 8
 
string stats_url = '/_ah/stats'
 
float RECORD_FRACTION = 1.0
 
list FILTER_LIST = []
 
 DATASTORE_DETAILS = False
 
 CALC_RPC_COSTS = False
 
tuple DATASTORE_READ_OP_COST = _to_micropennies_per_op(7, 100000)
 
tuple DATASTORE_WRITE_OP_COST = _to_micropennies_per_op(10, 100000)
 
tuple DATASTORE_SMALL_OP_COST = _to_micropennies_per_op(1, 100000)
 
tuple MAIL_RECIPIENT_COST = _to_micropennies_per_op(1, 1000)
 
tuple CHANNEL_CREATE_COST = _to_micropennies_per_op(1, 100)
 
tuple XMPP_STANZA_COST = _to_micropennies_per_op(10, 100000)
 

Detailed Description

Configurable constants.

To override appstats configuration valuess, define values like this
in your appengine_config.py file (in the root of your app):

  appstats_MAX_STACK = 5
  appstats_MAX_LOCALS = 0

More complete documentation for all configurable constants can be
found in the file sample_appengine_config.py.

Member Function Documentation

def google.appengine.ext.appstats.recording.ConfigDefaults.extract_key (   request)
Extract a canonical key from a StatsProto instance.

This default implementation calls config.normalize_path() on the
path returned by request.http_path(), and then prepends the HTTP
method and a space, unless the method is 'GET', in which case the
method and the space are omitted (so as to display a more compact
key in the user interface).

Args:
  request: a StatsProto instance.

Returns:
  A string, typically something like '/foo/bar/X' or 'POST /foo/bar'.
def google.appengine.ext.appstats.recording.ConfigDefaults.normalize_path (   path)
Transform a path to a canonical key for that path.

Args:
  path: A string, e.g. '/foo/bar/12345'.

Returns:
  A string derived from path, e.g. '/foo/bar/X'.
def google.appengine.ext.appstats.recording.ConfigDefaults.should_record (   env)
Return a bool indicating whether we should record this request.

Args:
  env: The CGI or WSGI environment dict.

Returns:
  True if this request should be recorded, False if not.

The default implementation returns True iff the request matches
FILTER_LIST (see above) *and* random.random() < RECORD_FRACTION.

The documentation for this class was generated from the following file: