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.analytics.main.StatsPage Class Reference
Inheritance diagram for google.appengine.ext.analytics.main.StatsPage:
google.appengine.ext.webapp._webapp25.RequestHandler

Public Member Functions

def FilterRecords
 
def RenderMain
 
def RenderDrill
 
def RenderDetail
 
def RenderError
 
def RenderPklList
 
def ReadableTime
 
def ListPklFiles
 
def GetRoot
 
def ReadData
 
def InitURLStats
 
def get
 
- Public Member Functions inherited from google.appengine.ext.webapp._webapp25.RequestHandler
def initialize
 
def get
 
def post
 
def head
 
def options
 
def put
 
def delete
 
def trace
 
def error
 
def redirect
 
def handle_exception
 
def new_factory
 
def get_url
 

Static Public Attributes

tuple dirname = os.path.join(os.path.dirname(__file__))
 

Additional Inherited Members

- Public Attributes inherited from google.appengine.ext.webapp._webapp25.RequestHandler
 request
 
 response
 

Detailed Description

Handler for analysis page.

Member Function Documentation

def google.appengine.ext.analytics.main.StatsPage.FilterRecords (   self,
  recordlist,
  recording_starttime 
)
Returns subset of records that meet filtering crtieria.

While navigating the tool, developers may wish to focus on a certain
subset of records that meet desired filters. Currently, the supported
filters are (i) by time of recording; and (ii) request latency. Filter
information is parsed from request arguments.

Args:
  recordlist: List of raw appstats records over which filtering condition
must be applied.
  recording_starttime: Timestamp when recording of data starts expressed
in seconds. This is the timestamp of the earliest recorded Appstats
data.
Returns:
  Subset of records that meet the filtering criteria
def google.appengine.ext.analytics.main.StatsPage.get (   self)
Handler for statistics/diagnostics page.
def google.appengine.ext.analytics.main.StatsPage.GetRoot (   self)
Determine the root directory of the application.

Returns:
  Root directory of the application, i.e. directory that has app.yaml
  file. Returns None if it cannot locate the root directory.
def google.appengine.ext.analytics.main.StatsPage.InitURLStats (   self,
  recordlist 
)
Initialize data structures from appstats data.

Args:
  recordlist: A list of Appstats records in RequestStatProto protobuf
format in reverse chronological order (i.e. most recent first).
Returns:
  records_bytimestamp: A dictionary. Each key is the timestamp of an
Appstats record (expressed in seconds). Each value is the
corresponding Appstats record (RequestStatProto protobuf).
  urlstatsdict: A dictionary with keys being URL paths, and values
being URLStat objects.
def google.appengine.ext.analytics.main.StatsPage.ListPklFiles (   self)
Create a list of available pkl files.

Generates a directory listing of application root directory to obtain
a list of all pkl files.

Returns:
  pklfiles: A list of tuples one per pkl file in the application
root directory. Each tuple contains the file name, seconds
elapsed since last modification, and a user-friendly version of elapsed
second information. The list is sorted by seconds elapsed, i.e. most
recently downloaded files are listed first.
def google.appengine.ext.analytics.main.StatsPage.ReadableTime (   self,
  seconds 
)
Convert seconds into user-friendly time.

The seconds elapsed since an appstats file is shown on the directory
page. This is converted into the most appropriate combination of units
(minute, hour or day) to make it easy for the user to read.

Args:
  seconds: Seconds elapsed since an Appstats data file was downloaded.
Returns:
  elapsed: Readable version of seconds elapsed.
def google.appengine.ext.analytics.main.StatsPage.ReadData (   self,
  source 
)
Parses source option and reads appropriate data source.

Args:
  source: Source of Appstats data. Either filename if being read from
a file or MEMCACHE if being read from memcache.
Returns:
  errormessage: An error message to display to the user if an error occured
while reading data, None if no error occured.
  recordlist: A list of Appstats records in RequestStatProto protobuf format
in reverse chronological order (i.e. most recent first).
def google.appengine.ext.analytics.main.StatsPage.RenderDetail (   self,
  url,
  urlstatsdict,
  records_bytimestamp,
  detail 
)
Renders detailed Appstats view of single request.

Args:
  url: URL that is being drilled into.
  urlstatsdict: A dictionary with keys being URL paths, and values
being URLStat objects.
  records_bytimestamp: A dictionary. Each key is the timestamp of an
Appstats record (expressed in seconds). Each value is the
corresponding Appstats record (RequestStatProto protobuf).
  detail: An index that can help identify which record is being
desired.
def google.appengine.ext.analytics.main.StatsPage.RenderDrill (   self,
  url,
  urlstatsdict,
  recording_starttime,
  source,
  filter_condition 
)
Rendering analysis page that drills into URL.

Args:
  url: URL that is being drilled into.
  urlstatsdict: A dictionary with keys being URL paths, and values
being URLStat objects.
  recording_starttime: Timestamp when recording of data starts expressed
in seconds. This is the timestamp of the earliest recorded Appstats
data.
  source: Source of Appstats data. Either filename if being read from
a file or MEMCACHE if being read from memcache.
  filter_condition: Filter object that specifies filtering criteria on
which requests must be shown.
def google.appengine.ext.analytics.main.StatsPage.RenderError (   self,
  errormessage,
  source 
)
Render error message page.

Args:
  errormessage: Error message to be rendered.
  source: Source of Appstats data. Either filename if being read from
a file or MEMCACHE if being read from memcache.
def google.appengine.ext.analytics.main.StatsPage.RenderMain (   self,
  urlstatsdict,
  source,
  recording_starttime 
)
Rendering main page of analysis page.

Args:
  urlstatsdict: A dictionary with keys being URL paths, and values
being URLStat objects.
  source: Source of Appstats data. Either filename if being read from
a file or MEMCACHE if being read from memcache.
  recording_starttime: Timestamp when recording of data starts expressed
in seconds. This is the timestamp of the earliest recorded Appstats
data.
def google.appengine.ext.analytics.main.StatsPage.RenderPklList (   self,
  pklfiles 
)
Render directory listing of all pkl files.

Args:
  pklfiles: A list of pklfiles in the application root directory.

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