Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Besenreuther <timo.besenreuther@gmail.com>2013-03-26 21:16:35 +0400
committerTimo Besenreuther <timo.besenreuther@gmail.com>2013-03-26 21:16:35 +0400
commit65458d099ae4a0ddb1923b7f6e110c5c0a9d3207 (patch)
tree030d0e094df2f7da4fd28614910834283ead7489 /plugins/Actions/ArchivingHelper.php
parentfc578d6546e15001cd4de4459cc8fadf516ebbac (diff)
refs #1700 basic performance analytics: handle server generation time for each page and page title
CORE * formatting sub-second times * getColumn() method on data table array (in order to behave the same as the regular data table class) * data tables can store in their meta data, which columns are empty (this is used in order to dynamically hide the new "generation time" column) * ViewDataTable and Api.getProcessedReport act according to the empty column meta data SCHEMA * new column custom_float_1 in log_link_visit_action * new version to apply the change TRACKER * Piwik_Tracker::setGenerationTime * tracking parameter "generation_time_me" * value is stored in new custom_float_1 column * the log importer can handle a group "generation_time_micro" which can be used in a custom log format. _micro is used because apache can log the time in microseconds but piwik processes milliseconds. * note: extension of JS tracker still missing ACTIONS PLUGIN * for pages and page titles, add new columns sum_time_generation and nb_hits_with_time_generation to the blob archives * if they are set, compute avg_time_generation on the API level. if not, remove the columns and mark them as empty in the data table meta data. * show new column "avg. generation time" in the pages and page titles reports plus TESTS for everything
Diffstat (limited to 'plugins/Actions/ArchivingHelper.php')
-rw-r--r--plugins/Actions/ArchivingHelper.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Actions/ArchivingHelper.php b/plugins/Actions/ArchivingHelper.php
index fe746839ee..30fb58b555 100644
--- a/plugins/Actions/ArchivingHelper.php
+++ b/plugins/Actions/ArchivingHelper.php
@@ -122,7 +122,18 @@ class Piwik_Actions_ArchivingHelper
$actionRow->maxVisitsSummed = !empty($row[Piwik_Archive::INDEX_PAGE_NB_HITS]) ? $row[Piwik_Archive::INDEX_PAGE_NB_HITS] : 0;
}
}
-
+
+ if ($row['type'] != Piwik_Tracker_Action::TYPE_ACTION_URL
+ && $row['type'] != Piwik_Tracker_Action::TYPE_ACTION_NAME) {
+ // only keep performance metrics when they're used (i.e. for URLs and page titles)
+ if (array_key_exists(Piwik_Archive::INDEX_PAGE_SUM_TIME_GENERATION, $row)) {
+ unset($row[Piwik_Archive::INDEX_PAGE_SUM_TIME_GENERATION]);
+ }
+ if (array_key_exists(Piwik_Archive::INDEX_PAGE_NB_HITS_WITH_TIME_GENERATION, $row)) {
+ unset($row[Piwik_Archive::INDEX_PAGE_NB_HITS_WITH_TIME_GENERATION]);
+ }
+ }
+
unset($row['name']);
unset($row['type']);
unset($row['idaction']);