Class Dal_Statistics_Tracker

Description

The data access layer code for summarising raw data into statistics, for the Tracker module.

Located in /maintenance/libraries/max/Dal/StatisticsTracker.php (line 43)

Dal
   |
   --Dal_Statistics_Common
      |
      --Dal_Statistics_Tracker
Direct descendents
Class Description
 class Dal_Statistics_Tracker_Split The data access layer code for summarising raw data into statistics, for
Method Summary
 Dal_Statistics_Tracker Dal_Statistics_Tracker ()
 integer deleteOldData (Date $summarisedTo)
 Date getMaintenanceStatisticsLastRunInfo (integer $type, [Date $now = null])
 void logCompletion (Date $start, Date $end, integer $type, Date $updateTo, string &$report)
 Date _getMaintenanceStatisticsLastRunInfo (integer $type, string $rawTable, [Date $now = null])
Variables
Methods
Constructor Dal_Statistics_Tracker (line 51)

The constructor method.

Dal_Statistics_Tracker Dal_Statistics_Tracker ()
deleteOldData (line 188)

A method to delete old (ie. summarised) raw data.

  • return: The number of rows deleted.
integer deleteOldData (Date $summarisedTo)
  • Date $summarisedTo: The date/time up to which data have been summarised (i.e. data up to and including this date (minus any compact_stats_grace window) will be deleted).

Redefinition of:
Dal_Statistics_Common::deleteOldData()
A method to delete old (ie. summarised) raw data.

Redefined in descendants as:
getMaintenanceStatisticsLastRunInfo (line 88)

A method to find the last time that maintenance statistics was run.

  • return: A Date representing the date up to which the statistics have been summarised, for the specified update type, or the appropriate date based on raw data if maintenance statistics has never been run for the Max module before. Returns null if no raw data is available.
Date getMaintenanceStatisticsLastRunInfo (integer $type, [Date $now = null])
  • integer $type: The update type that occurred - that is, 0 if the update was done on the basis of the operation interval, or 1 if the update was done on the basis of the hour.
  • Date $now: An optional Date, used to specify the "current time", and to limit the method to only look for past maintenance statistics runs before this date. Normally only used to assist with re-generation of statistics in the event of faulty raw tables.

Redefinition of:
Dal_Statistics_Common::getMaintenanceStatisticsLastRunInfo()
A method to find the last time that maintenance statistics was run.

Redefined in descendants as:
logCompletion (line 246)

A method to store the details logging a maintenance statistics run.

void logCompletion (Date $start, Date $end, integer $type, Date $updateTo, string &$report)
  • Date $start: The time that the maintenance statistics run started.
  • Date $end: The time that the maintenance statistics run ended.
  • integer $type: The type of run:
    1. - The update was based on the operation interval;
    2. - The update was based on the hour;
    3. - The update was based on both the operation interval and hour.
  • Date $updateTo: The end of the operation interval/hour that has been updated.
  • string $report: The maintenance statistics run report.

Redefinition of:
Dal_Statistics_Common::logCompletion()
A method to store the details logging a maintenance statistics run.
singleton (line 62)

The singleton method to create or return a single instance of the class.

  • return: The returned Dal_Statistics_Tracker object.
  • static:
Dal_Statistics_Tracker &singleton ()

Redefinition of:
Dal_Statistics_Common::singleton()
The singleton method to create or return a single instance of the class.

Redefined in descendants as:
_getMaintenanceStatisticsLastRunInfo (line 117)

A private function to do the job of Dal_Statistics_Tracker::getMaintenanceStatisticsLastRunInfo(), but with an extra parameter to specify the raw table to look in, in the case of maintenance statistics not having been run before.

  • return: A Date representing the date up to which the statistics have been summarised, for the specified update type, or the appropriate date based on raw data if maintenance statistics has never been run for the Max module before. Returns null if no raw data is available.
  • private:
Date _getMaintenanceStatisticsLastRunInfo (integer $type, string $rawTable, [Date $now = null])
  • integer $type: The update type that occurred - that is, 0 if the update was done on the basis of the operation interval, or 1 if the update was done on the basis of the hour.
  • string $rawTable: The raw table to use in case of no previous run.
  • Date $now: An optional Date, used to specify the "current time", and to limit the method to only look for past maintenance statistics runs before this date. Normally only used to assist with re-generation of statistics in the event of faulty raw tables.

Inherited Methods

Inherited From Dal_Statistics_Common

 Dal_Statistics_Common::Dal_Statistics_Common()
 Dal_Statistics_Common::deleteOldData()
 Dal_Statistics_Common::getMaintenanceStatisticsLastRunInfo()
 Dal_Statistics_Common::logCompletion()
 Dal_Statistics_Common::saveIntermediate()
 Dal_Statistics_Common::saveSummary()
 Dal_Statistics_Common::singleton()
 Dal_Statistics_Common::summariseClicks()
 Dal_Statistics_Common::summariseConnections()
 Dal_Statistics_Common::summariseImpressions()

Inherited From Dal

 Dal::Dal()
 Dal::affectedRows()
 Dal::execute()
 Dal::executeIgnoreErrors()
 Dal::fetchResultAsArray()
 Dal::numberOfRows()
 Dal::singleton()

Documentation generated on Thu, 20 Jan 2005 17:11:01 +0000 by phpDocumentor 1.3.0RC3