r91314 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91313‎ | r91314 | r91315 >
Date:22:43, 1 July 2011
Author:reedy
Status:deferred
Tags:
Comment:
Add estimate offline metric
Modified paths:
  • /trunk/extensions/MetricsReporting/MetricsReporting.php (modified) (history)
  • /trunk/extensions/MetricsReporting/metrics/EstimateOfflineMetric.php (added) (history)

Diff [purge]

Index: trunk/extensions/MetricsReporting/MetricsReporting.php
@@ -54,5 +54,8 @@
5555 $wgAutoloadClasses['DumpNewRegisteredEditorsMetric'] = $metricsDir . 'DumpNewRegisteredEditorsMetric.php';
5656 $wgMetricAPIModules['dumpnewregisterededitors'] = 'DumpNewRegisteredEditorsMetric';
5757
 58+$wgAutoloadClasses['EstimateOfflineMetric'] = $metricsDir . 'EstimateOfflineMetric.php';
 59+$wgMetricAPIModules['estimateoffline'] = 'EstimateOfflineMetric';
 60+
5861 $wgAutoloadClasses['SquidPageViewsMetric'] = $metricsDir . 'SquidPageViewsMetric.php';
5962 $wgMetricAPIModules['squidpageviews'] = 'SquidPageViewsMetric';
Index: trunk/extensions/MetricsReporting/metrics/EstimateOfflineMetric.php
@@ -0,0 +1,38 @@
 2+<?php
 3+
 4+class EstimateOfflineMetric extends ApiAnalyticsBase {
 5+
 6+ public function getAllowedFilters() {
 7+ return array(
 8+ );
 9+ }
 10+
 11+ protected function getQueryInfo() {
 12+ return array(
 13+ 'table' => 'offline',
 14+ 'conds' => array(),
 15+ 'options' => array(),
 16+ 'join_conds' => array(),
 17+ );
 18+ }
 19+
 20+ protected function getQueryFields() {
 21+ return array(
 22+ 'date', 'readers',
 23+ );
 24+ }
 25+
 26+ public function getDescription() {
 27+ return 'Estimated number of Offline Users';
 28+ }
 29+
 30+ protected function getExamples() {
 31+ return array(
 32+ 'api.php?action=analytics&metric=estimateoffline',
 33+ );
 34+ }
 35+
 36+ public function getVersion() {
 37+ return __CLASS__ . ': $Id$';
 38+ }
 39+}
Property changes on: trunk/extensions/MetricsReporting/metrics/EstimateOfflineMetric.php
___________________________________________________________________
Added: svn:eol-style
140 + native
Added: svn:keywords
241 + Id

Status & tagging log