diff --git a/core/Piwik.php b/core/Piwik.php
index 21a5a24d5808e18f87cf26bfe22f12f16ee63e1a..4915115d21060e60af7ada18ca842e65767f95ca 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -1417,9 +1417,9 @@ class Piwik
             $minutes = floor(($reminder = ($numberOfSeconds - $hours * 3600)) / 60);
             $seconds = floor($reminder - $minutes * 60);
             $time = sprintf("%02s", $hours) . ':' . sprintf("%02s", $minutes) . ':' . sprintf("%02s", $seconds);
-            $milliSeconds = ($numberOfSeconds * 1000) % 1000;
-            if ($milliSeconds) {
-                $time .= '.' . sprintf("%03s", $milliSeconds);
+            $centiSeconds = ($numberOfSeconds * 100) % 100;
+            if ($centiSeconds) {
+                $time .= '.' . sprintf("%02s", $centiSeconds);
             }
             return $time;
         }
@@ -1435,8 +1435,7 @@ class Piwik
         $minutes = floor($minusDaysAndHours / 60);
 
         $seconds = $minusDaysAndHours - $minutes * 60;
-		
-		$milliSeconds = ($numberOfSeconds * 1000) % 1000;
+		$seconds = round($seconds, 2);
 
         if ($years > 0) {
             $return = sprintf(Piwik_Translate('General_YearsDays'), $years, $days);
@@ -1446,9 +1445,7 @@ class Piwik
             $return = sprintf(Piwik_Translate('General_HoursMinutes'), $hours, $minutes);
         } elseif ($minutes > 0) {
             $return = sprintf(Piwik_Translate('General_MinutesSeconds'), $minutes, $seconds);
-		} elseif ($milliSeconds > 0 && $seconds < 1) {
-			$return = sprintf(Piwik_Translate('General_Milliseconds'), $milliSeconds);
-        } else {
+		} else {
             $return = sprintf(Piwik_Translate('General_Seconds'), $seconds);
         }
         if ($isHtml) {
diff --git a/lang/en.php b/lang/en.php
index 7366f4050adb274fc92aa6ec8e5806215f83babf..4e086d28c28422deac6b94ec7cbf2e6100b98627 100644
--- a/lang/en.php
+++ b/lang/en.php
@@ -191,7 +191,6 @@ $translations = array(
 	'General_HoursMinutes' => '%1$s hours %2$s min',
 	'General_MinutesSeconds' => '%1$s min %2$ss',
 	'General_Seconds' => '%ss',
-	'General_Milliseconds' => '%sms',
 	'General_Save' => 'Save',
 	'General_Faq' => 'FAQ',
 	'General_ForExampleShort' => 'eg.',
@@ -439,6 +438,7 @@ $translations = array(
 	'Actions_SiteSearchCategories2' => 'For example, Ecommerce websites typically have a "Category" selector so that visitors can restrict their searches to all products in a specific Category.',
 	'Actions_SiteSearchKeywordsNoResultDocumentation' => 'This report lists the Search Keywords that did not return any Search result: maybe the search engine algorithm can be improved, or maybe your visitors are looking for content that is not (yet) on your website?',
 	'Actions_SiteSearchFollowingPagesDoc' => 'When visitors search on your website, they are looking for a particular page, content, product, or service. This report lists the pages that were clicked the most after an internal search. In other words, the list of pages the most searched for by visitors already on your website.',
+	'Actions_AvgGenerationTimeTooltip' => 'Average based on %s hit(s)',
 	'AnonymizeIP_PluginDescription' => 'Anonymize the last byte(s) of visitors IP addresses to comply with your local privacy laws/guidelines.',
 	'API_PluginDescription' => 'All the data in Piwik is available through simple APIs. This plugin is the web service entry point, that you can call to get your Web Analytics data in xml, json, php, csv, etc.',
 	'API_QuickDocumentationTitle' => 'API quick documentation',
@@ -1940,6 +1940,7 @@ And thank you for using Piwik!',
 	'VisitsSummary_MaxNbActions' => '%s max actions in one visit',
 	'VisitsSummary_NbActionsPerVisit' => '%s actions (page views, downloads, outlinks and internal site searches) per visit',
 	'VisitsSummary_NbVisitsBounced' => '%s visits have bounced (left the website after one page)',
+	'VisitsSummary_AverageGenerationTime' => '%s average generation time',
 	'VisitsSummary_GenerateTime' => '%s seconds to generate the page',
 	'VisitsSummary_GenerateQueries' => '%s queries executed',
 	'VisitsSummary_WidgetLastVisits' => 'Visits Over Time',
diff --git a/misc/log-analytics/README.md b/misc/log-analytics/README.md
index 13b8a0ea87c6aaa0e5eeb886a4adcbc9611d05a9..09dc2b623de6694c481dbf14836e34b5690f3d25 100644
--- a/misc/log-analytics/README.md
+++ b/misc/log-analytics/README.md
@@ -175,3 +175,13 @@ This log format can be specified for nginx access logs to capture multiple virtu
 * access_log /PATH/TO/access.log vhosts;
 
 When executing import_logs.py specify the "common_complete" format.
+
+
+## Import Generation Time
+
+Apache can log the generation time in microseconds using %D in the LogFormat.
+This metric can be imported using a custom log format in this script, which means that you have to specify a --log-format-regex parameter that contains the group generation_time_micro.  
+
+Here's an example:
+Apache LogFormat "%h %l %u %t \"%r\" %>s %b %D"
+--log-format-regex="(?P<ip>\S+) \S+ \S+ \[(?P<date>.*?) (?P<timezone>.*?)\] \"\S+ (?P<path>.*?) \S+\" (?P<status>\S+) (?P<length>\S+) (?P<generation_time_micro>\S+)"
\ No newline at end of file
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index 785c6c69dc1b20573c350b34b202a60764d6e061..3be72a186ca717dec3df0610a23cc91141d96d3b 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -1437,11 +1437,14 @@ class Parser(object):
             except (ValueError, IndexError):
                 # Some lines or formats don't have a length (e.g. 304 redirects, IIS logs)
                 hit.length = 0
-                
+
             try:
-			    hit.generation_time_milli = int(match.group('generation_time_micro')) / 1000
+                hit.generation_time_milli = int(match.group('generation_time_milli'))
             except IndexError:
-                hit.generation_time_milli = 0
+                try:
+                    hit.generation_time_milli = int(match.group('generation_time_micro')) / 1000
+                except IndexError:
+                    hit.generation_time_milli = 0
 
             if config.options.log_hostname:
                 hit.host = config.options.log_hostname
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index 030f954d93359832e3c272279c81c5909f660c63..ad9d15e73e659583c5c51ba4f7b28eaf64a53336 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -73,14 +73,15 @@ class Piwik_Actions_API
         $archive = Piwik_Archive::build($idSite, $period, $date, $segment);
 
         $metrics = array(
-            'Actions_nb_pageviews'      => 'nb_pageviews',
-            'Actions_nb_uniq_pageviews' => 'nb_uniq_pageviews',
-            'Actions_nb_downloads'      => 'nb_downloads',
-            'Actions_nb_uniq_downloads' => 'nb_uniq_downloads',
-            'Actions_nb_outlinks'       => 'nb_outlinks',
-            'Actions_nb_uniq_outlinks'  => 'nb_uniq_outlinks',
-            'Actions_nb_searches'       => 'nb_searches',
-            'Actions_nb_keywords'       => 'nb_keywords',
+            'Actions_nb_pageviews'        => 'nb_pageviews',
+            'Actions_nb_uniq_pageviews'   => 'nb_uniq_pageviews',
+            'Actions_nb_downloads'        => 'nb_downloads',
+            'Actions_nb_uniq_downloads'   => 'nb_uniq_downloads',
+            'Actions_nb_outlinks'         => 'nb_outlinks',
+            'Actions_nb_uniq_outlinks'    => 'nb_uniq_outlinks',
+            'Actions_nb_searches'         => 'nb_searches',
+            'Actions_nb_keywords'         => 'nb_keywords',
+			'Actions_avg_time_generation' => 'avg_time_generation'
         );
 
         // get requested columns
@@ -95,16 +96,38 @@ class Piwik_Actions_API
                 $columns[$i] = $fullColumn;
                 $nameReplace[$fullColumn] = $column;
             }
+			
+			if (false !== ($avgGenerationTimeRequested = array_search('Actions_avg_time_generation', $columns))) {
+				unset($columns[$avgGenerationTimeRequested]);
+				$avgGenerationTimeRequested = true;
+			}
         } else {
             // get all columns
+			unset($metrics['Actions_avg_time_generation']);
             $columns = array_keys($metrics);
             $nameReplace = & $metrics;
+			$avgGenerationTimeRequested = true;
         }
-
+		
+		if ($avgGenerationTimeRequested) {
+			$tempColumns[] = 'Actions_sum_time_generation';
+			$tempColumns[] = 'Actions_nb_hits_with_time_generation';
+			$nameReplace['Actions_sum_time_generation'] = 'sum_time_generation';
+			$nameReplace['Actions_nb_hits_with_time_generation'] = 'nb_hits_with_time_generation';
+			$columns = array_merge($columns, $tempColumns);
+			$columns = array_unique($columns);
+		}
+		
         $table = $archive->getDataTableFromNumeric($columns);
 
         // replace labels (remove Actions_)
         $table->filter('ReplaceColumnNames', array($nameReplace));
+		
+		// compute avg generation time
+		if ($avgGenerationTimeRequested) {
+			$table->filter('ColumnCallbackAddColumnQuotient', array('avg_time_generation', 'sum_time_generation', 'nb_hits_with_time_generation', 3));
+			$table->deleteColumns(array('sum_time_generation', 'nb_hits_with_time_generation'));
+		}
 
         return $table;
     }
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index f5bd2674cae5658a86b9fe2258b419e145402d09..097d2e3dee0e3875a4d1c0c641e923b248610c5d 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -185,23 +185,25 @@ class Piwik_Actions extends Piwik_Plugin
             'module'               => 'Actions',
             'action'               => 'get',
             'metrics'              => array(
-                'nb_pageviews'      => Piwik_Translate('General_ColumnPageviews'),
-                'nb_uniq_pageviews' => Piwik_Translate('General_ColumnUniquePageviews'),
-                'nb_downloads'      => Piwik_Translate('Actions_ColumnDownloads'),
-                'nb_uniq_downloads' => Piwik_Translate('Actions_ColumnUniqueDownloads'),
-                'nb_outlinks'       => Piwik_Translate('Actions_ColumnOutlinks'),
-                'nb_uniq_outlinks'  => Piwik_Translate('Actions_ColumnUniqueOutlinks'),
-                'nb_searches'       => Piwik_Translate('Actions_ColumnSearches'),
-                'nb_keywords'       => Piwik_Translate('Actions_ColumnSiteSearchKeywords'),
+                'nb_pageviews'        => Piwik_Translate('General_ColumnPageviews'),
+                'nb_uniq_pageviews'   => Piwik_Translate('General_ColumnUniquePageviews'),
+                'nb_downloads'        => Piwik_Translate('Actions_ColumnDownloads'),
+                'nb_uniq_downloads'   => Piwik_Translate('Actions_ColumnUniqueDownloads'),
+                'nb_outlinks'         => Piwik_Translate('Actions_ColumnOutlinks'),
+                'nb_uniq_outlinks'    => Piwik_Translate('Actions_ColumnUniqueOutlinks'),
+                'nb_searches'         => Piwik_Translate('Actions_ColumnSearches'),
+                'nb_keywords'         => Piwik_Translate('Actions_ColumnSiteSearchKeywords'),
+				'avg_time_generation' => Piwik_Translate('General_ColumnAverageGenerationTime'),
             ),
             'metricsDocumentation' => array(
-                'nb_pageviews'      => Piwik_Translate('General_ColumnPageviewsDocumentation'),
-                'nb_uniq_pageviews' => Piwik_Translate('General_ColumnUniquePageviewsDocumentation'),
-                'nb_downloads'      => Piwik_Translate('Actions_ColumnClicksDocumentation'),
-                'nb_uniq_downloads' => Piwik_Translate('Actions_ColumnUniqueClicksDocumentation'),
-                'nb_outlinks'       => Piwik_Translate('Actions_ColumnClicksDocumentation'),
-                'nb_uniq_outlinks'  => Piwik_Translate('Actions_ColumnUniqueClicksDocumentation'),
-                'nb_searches'       => Piwik_Translate('Actions_ColumnSearchesDocumentation'),
+                'nb_pageviews'        => Piwik_Translate('General_ColumnPageviewsDocumentation'),
+                'nb_uniq_pageviews'   => Piwik_Translate('General_ColumnUniquePageviewsDocumentation'),
+                'nb_downloads'        => Piwik_Translate('Actions_ColumnClicksDocumentation'),
+                'nb_uniq_downloads'   => Piwik_Translate('Actions_ColumnUniqueClicksDocumentation'),
+                'nb_outlinks'         => Piwik_Translate('Actions_ColumnClicksDocumentation'),
+                'nb_uniq_outlinks'    => Piwik_Translate('Actions_ColumnUniqueClicksDocumentation'),
+                'nb_searches'         => Piwik_Translate('Actions_ColumnSearchesDocumentation'),
+				'avg_time_generation' => Piwik_Translate('General_ColumnAverageGenerationTimeDocumentation'),
 //				'nb_keywords' => Piwik_Translate('Actions_ColumnSiteSearchKeywords'),
             ),
             'processedMetrics'     => false,
diff --git a/plugins/Actions/Archiving.php b/plugins/Actions/Archiving.php
index db71faf7885e71cdf4d8ecda45e88fee5bd187a8..848b4cc562710df7ea58bd6099676e5755a4f37c 100644
--- a/plugins/Actions/Archiving.php
+++ b/plugins/Actions/Archiving.php
@@ -74,6 +74,8 @@ class Piwik_Actions_Archiving
                                                          'Actions_nb_outlinks',
                                                          'Actions_nb_uniq_outlinks',
                                                          'Actions_nb_searches',
+                                                         'Actions_sum_time_generation',
+                                                         'Actions_nb_hits_with_time_generation',
                                                     ));
 
         // Unique Keywords can't be summed, instead we take the RowsCount() of the keyword table
@@ -359,6 +361,8 @@ class Piwik_Actions_Archiving
         $archiveProcessing->insertBlobRecord('Actions_actions_url', $s);
         $archiveProcessing->insertNumericRecord('Actions_nb_pageviews', array_sum($dataTable->getColumn(Piwik_Archive::INDEX_PAGE_NB_HITS)));
         $archiveProcessing->insertNumericRecord('Actions_nb_uniq_pageviews', array_sum($dataTable->getColumn(Piwik_Archive::INDEX_NB_VISITS)));
+		$archiveProcessing->insertNumericRecord('Actions_sum_time_generation', array_sum($dataTable->getColumn(Piwik_Archive::INDEX_PAGE_SUM_TIME_GENERATION)));
+		$archiveProcessing->insertNumericRecord('Actions_nb_hits_with_time_generation', array_sum($dataTable->getColumn(Piwik_Archive::INDEX_PAGE_NB_HITS_WITH_TIME_GENERATION)));
         destroy($dataTable);
 
         $dataTable = $this->actionsTablesByType[Piwik_Tracker_Action::TYPE_DOWNLOAD];
diff --git a/plugins/Actions/Controller.php b/plugins/Actions/Controller.php
index aed8efd68323c21427ebf7304a216b6fe45947ad..1744a63155de53d93889a6f89854be12abe08186 100644
--- a/plugins/Actions/Controller.php
+++ b/plugins/Actions/Controller.php
@@ -385,9 +385,14 @@ class Piwik_Actions_Controller extends Piwik_Controller
             $view->setColumnTranslation('bounce_rate', Piwik_Translate('General_ColumnBounceRate'));
             $view->setColumnTranslation('exit_rate', Piwik_Translate('General_ColumnExitRate'));
             $view->setColumnTranslation('avg_time_generation', Piwik_Translate('General_ColumnAverageGenerationTime'));
-            $view->queueFilter('ColumnCallbackReplace', array('avg_time_on_page', array('Piwik', 'getPrettyTimeFromSeconds')));
-            $view->queueFilter('ColumnCallbackReplace', array('avg_time_generation',
-                                                              create_function('$averageTimeOnSite', 'return $averageTimeOnSite ? Piwik::getPrettyTimeFromSeconds($averageTimeOnSite, true, true, false) : "-";')));
+            
+			$view->queueFilter('ColumnCallbackReplace', array('avg_time_on_page', array('Piwik', 'getPrettyTimeFromSeconds')));
+			
+			$avgTimeCallback = create_function('$time', 'return $time ? Piwik::getPrettyTimeFromSeconds($time, true, true, false) : "-";');
+            $view->queueFilter('ColumnCallbackReplace', array('avg_time_generation', $avgTimeCallback));
+			
+			$tooltipCallback = create_function('$hits', 'return $hits ? Piwik_Translate("Actions_AvgGenerationTimeTooltip", $hits) : false;');
+			$view->queueFilter('ColumnCallbackAddMetadata', array('nb_hits_with_time_generation', 'avg_time_generation_tooltip', $tooltipCallback));
         }
 
         if (Piwik_Common::getRequestVar('enable_filter_excludelowpop', '0', 'string') != '0') {
diff --git a/plugins/CoreHome/templates/datatable.css b/plugins/CoreHome/templates/datatable.css
index dfaf958e01e2800274b5c6786e1a0f9f629222ee..daddbc86b0fb8e764d2abee40248714157f7170e 100644
--- a/plugins/CoreHome/templates/datatable.css
+++ b/plugins/CoreHome/templates/datatable.css
@@ -803,3 +803,7 @@ a.tableConfigurationIcon.highlighted {
 .tableConfiguration div.configItem span.action {
     color: #255792;
 }
+
+table.dataTable span.cell-tooltip {
+	cursor: default;
+}
\ No newline at end of file
diff --git a/plugins/CoreHome/templates/datatable.js b/plugins/CoreHome/templates/datatable.js
index 2a8f437d650d6ff3a301a593716a5cc540a81167..c5553ca4f6becb24bfeada9f9361932e59660e98 100644
--- a/plugins/CoreHome/templates/datatable.js
+++ b/plugins/CoreHome/templates/datatable.js
@@ -223,6 +223,7 @@ dataTable.prototype =
         self.handleColumnDocumentation(domElem);
         self.handleReportDocumentation(domElem);
         self.handleRowActions(domElem);
+		self.handleCellTooltips(domElem);
         self.handleRelatedReports(domElem);
         self.handleTriggeredEvents(domElem);
     },
@@ -1312,6 +1313,19 @@ dataTable.prototype =
     handleRowActions: function (domElem) {
         this.doHandleRowActions(domElem.find('table > tbody > tr'));
     },
+	
+	handleCellTooltips: function(domElem) {
+		domElem.find('span.cell-tooltip').tooltip({
+			track: true,
+			items: 'span',
+			content: function() {
+				return $(this).data('tooltip');
+			},
+			show: false,
+			hide: false,
+			tooltipClass: 'small'
+		});
+	},
 
     handleRelatedReports: function (domElem) {
         var self = this,
@@ -1576,6 +1590,7 @@ actionDataTable.prototype =
     notifyWidgetParametersChange: dataTable.prototype.notifyWidgetParametersChange,
     handleRelatedReports: dataTable.prototype.handleRelatedReports,
     handleTriggeredEvents: dataTable.prototype.handleTriggeredEvents,
+	handleCellTooltips: dataTable.prototype.handleCellTooltips,
     _findReportHeader: dataTable.prototype._findReportHeader,
 
     //initialisation of the actionDataTable
@@ -1627,6 +1642,7 @@ actionDataTable.prototype =
         self.handleReportDocumentation(domElem);
         self.handleRelatedReports(domElem);
         self.handleTriggeredEvents(domElem);
+		self.handleCellTooltips(domElem);
     },
 
     //see dataTable::applyCosmetics
diff --git a/plugins/CoreHome/templates/datatable_cell.tpl b/plugins/CoreHome/templates/datatable_cell.tpl
index 3b1ec5cd98a06a01d0e3089274b7ae384d2dde14..0ecb4bd04c5c649a38ebf33d005d77fc2e042f1b 100644
--- a/plugins/CoreHome/templates/datatable_cell.tpl
+++ b/plugins/CoreHome/templates/datatable_cell.tpl
@@ -1,3 +1,5 @@
+{assign var="tooltipIndex" value=$column|cat:"_tooltip"}
+{if isset($row.metadata[$tooltipIndex])}<span class="cell-tooltip" data-tooltip="{$row.metadata[$tooltipIndex]|escape:'html'}">{/if}
 {if !$row.idsubdatatable && $column=='label' && !empty($row.metadata.url)}
 <a target="_blank" href='{if !in_array(substr($row.metadata.url,0,4), array('http','ftp:'))}http://{/if}{$row.metadata.url|escape:'html'}'>
     {if empty($row.metadata.logo)}
@@ -16,3 +18,4 @@
     {if !$row.idsubdatatable && $column=='label' && !empty($row.metadata.url)}
 </a>
 {/if}
+{if isset($row.metadata[$tooltipIndex])}</span>{/if}
\ No newline at end of file
diff --git a/plugins/VisitsSummary/Controller.php b/plugins/VisitsSummary/Controller.php
index 86ebf7b5ac9ee252b6c3e2ea86965db428dc1e1e..5857a7a34d1fe3441a920deb7e815c6715fe10b4 100644
--- a/plugins/VisitsSummary/Controller.php
+++ b/plugins/VisitsSummary/Controller.php
@@ -116,6 +116,7 @@ class Piwik_VisitsSummary_Controller extends Piwik_Controller
         $view->urlSparklineMaxActions = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('max_actions')));
         $view->urlSparklineActionsPerVisit = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('nb_actions_per_visit')));
         $view->urlSparklineBounceRate = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('bounce_rate')));
+		$view->urlSparklineAvgGenerationTime = $this->getUrlSparkline('getEvolutionGraph', array('columns' => array('avg_time_generation')));
 
         $idSite = Piwik_Common::getRequestVar('idSite');
         $displaySiteSearch = Piwik_Site::isSiteSearchEnabledFor($idSite);
@@ -145,6 +146,7 @@ class Piwik_VisitsSummary_Controller extends Piwik_Controller
         $view->bounceRate = Piwik::getPercentageSafe($nbBouncedVisits, $nbVisits);
         $view->maxActions = (int)$dataRow->getColumn('max_actions');
         $view->nbActionsPerVisit = $dataRow->getColumn('nb_actions_per_visit');
+		$view->averageGenerationTime = $dataActionsRow->getColumn('avg_time_generation');
 
         if ($displaySiteSearch) {
             $view->nbSearches = (int)$dataActionsRow->getColumn('nb_searches');
diff --git a/plugins/VisitsSummary/templates/sparklines.tpl b/plugins/VisitsSummary/templates/sparklines.tpl
index a0302f407a900cb7d3bcd2ed2ae5185da4e94a66..f57aa9ee94d8c4d6df2ce44a00919bcb72dd1b6d 100644
--- a/plugins/VisitsSummary/templates/sparklines.tpl
+++ b/plugins/VisitsSummary/templates/sparklines.tpl
@@ -17,6 +17,11 @@
         {sparkline src=$urlSparklineActionsPerVisit}
         {'VisitsSummary_NbActionsPerVisit'|translate:"<strong>$nbActionsPerVisit</strong>"}
     </div>
+	<div class="sparkline">
+		{sparkline src=$urlSparklineAvgGenerationTime}
+		{assign var=averageGenerationTime value=$averageGenerationTime|sumtime}
+		{'VisitsSummary_AverageGenerationTime'|translate:"<strong>$averageGenerationTime</strong>"}
+	</div>
 </div>
 
 <div id='rightcolumn'>
diff --git a/tests/PHPUnit/Core/PiwikTest.php b/tests/PHPUnit/Core/PiwikTest.php
index 87889904dc8d3fbe39001a2f01740abf6354e640..66e2514a7bf7871898ec66fd2fa844e6ff4706e0 100644
--- a/tests/PHPUnit/Core/PiwikTest.php
+++ b/tests/PHPUnit/Core/PiwikTest.php
@@ -88,11 +88,13 @@ class PiwikTest extends DatabaseTestCase
             array(86400 + 3600 * 10, array('1 days 10 hours', '34:00:00')),
             array(86400 * 365, array('365 days 0 hours', '8760:00:00')),
             array((86400 * (365.25 + 10)), array('1 years 10 days', '9006:00:00')),
-            array(1.342, array('1.342s', '00:00:01.342')),
-            array(.342, array('342ms', '00:00:00.342')),
-			array(.02, array('20ms', '00:00:00.020')),
-			array(1.002, array('1.002s', '00:00:01.002')),
-			array(122.1, array('2 min 2.1s', '00:02:02.100'))
+            array(1.342, array('1.34s', '00:00:01.34')),
+            array(.342, array('0.34s', '00:00:00.34')),
+			array(.02, array('0.02s', '00:00:00.02')),
+			array(1.002, array('1s', '00:00:01')),
+			array(1.02, array('1.02s', '00:00:01.02')),
+			array(1.2, array('1.2s', '00:00:01.20')),
+			array(122.1, array('2 min 2.1s', '00:02:02.10'))
         );
     }
 
diff --git a/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php b/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php
index bba9bdcd546a2538396ea86bae07016ba2c75820..fa4f246e942c1c07472490ebd8c5e8062d089034 100644
--- a/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php
+++ b/tests/PHPUnit/Fixtures/OneVisitorTwoVisits.php
@@ -76,12 +76,14 @@ class Test_Piwik_Fixture_OneVisitorTwoVisits extends Test_Piwik_BaseFixture
         // Record 1st page view
         $urlPage1 = 'http://example.org/index.htm?excluded_Parameter=SHOULD_NOT_DISPLAY&parameter=Should display';
         $t->setUrl($urlPage1);
+		$t->setGenerationTime(234);
         self::checkResponse($t->doTrackPageView('incredible title!'));
 
         // testing that / and index.htm above record with different URLs
         // Recording the 2nd page after 3 minutes
         $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.05)->getDatetime());
         $t->setUrl('http://example.org/');
+		$t->setGenerationTime(224);
         self::checkResponse($t->doTrackPageView('Second page view - should be registered as URL /'));
 
         // Click on external link after 6 minutes (3rd action)
@@ -116,16 +118,19 @@ class Test_Piwik_Fixture_OneVisitorTwoVisits extends Test_Piwik_BaseFixture
             // Site Search request
             $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.42)->getDatetime());
             $t->setUrl('http://example.org/index.htm?q=Banks Own The World');
+			$t->setGenerationTime(812);
             self::checkResponse($t->doTrackPageView('Site Search request'));
 
             // Final page view (after 27 min)
             $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.45)->getDatetime());
             $t->setUrl('http://example.org/index.htm');
+			$t->setGenerationTime(24);
             self::checkResponse($t->doTrackPageView('Looking at homepage after site search...'));
         } else {
             // Final page view (after 27 min)
             $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.45)->getDatetime());
             $t->setUrl('http://example.org/index.htm#ignoredFragment#');
+			$t->setGenerationTime(23);
             self::checkResponse($t->doTrackPageView('Looking at homepage (again)...'));
         }
 
@@ -144,6 +149,7 @@ class Test_Piwik_Fixture_OneVisitorTwoVisits extends Test_Piwik_BaseFixture
         $t->DEBUG_APPEND_URL = '&_idvc=2';
 
         // Goal Tracking URL matching, testing custom referer including keyword
+		$t->setGenerationTime(134);
         self::checkResponse($t->doTrackPageView('Checkout/Purchasing...'));
         // -
         // End of second visit
diff --git a/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php b/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php
index 5d07e49b2405ce007c09934cea59058d364ae31e..f8d1468e3956a81b80947c1e2df46e21906859dd 100755
--- a/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php
+++ b/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php
@@ -106,7 +106,8 @@ class Test_Piwik_Integration_OneVisitorTwoVisits extends IntegrationTestCase
                                                   'apiAction'              => 'getPageTitles', 'testSuffix' => '_hideColumns_',
                                                   'otherRequestParameters' => array(
                                                       'hideColumns' => 'nb_visits_converted,xyzaug,entry_nb_visits,' .
-                                                          'bounce_rate,nb_hits,nb_visits,avg_time_on_page,avg_time_generation'
+                                                          'bounce_rate,nb_hits,nb_visits,avg_time_on_page,' .
+														  'avg_time_generation,nb_hits_with_time_generation'
                                                   ))),
 
             array('API.getProcessedReport', array('idSite'                 => $idSite, 'date' => $dateTime,
@@ -132,7 +133,7 @@ class Test_Piwik_Integration_OneVisitorTwoVisits extends IntegrationTestCase
                                                          'bounce_rate,nb_hits,nb_visits,sum_time_spent,' .
                                                          'entry_sum_visit_length,entry_bounce_count,exit_nb_visits,' .
                                                          'entry_nb_uniq_visitors,exit_nb_uniq_visitors,entry_nb_actions,' .
-                                                         'avg_time_generation',
+                                                         'avg_time_generation,nb_hits_with_time_generation',
                                                      'expanded'    => '1'
                                                  ))),
         );
diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml
index 19323ec6b32fc1e1fcf4706275999d817215c8af..5c94d82678299e9231c45bbcf1f4004689b97a50 100755
--- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml
@@ -8,4 +8,5 @@
 	<nb_uniq_outlinks>0</nb_uniq_outlinks>
 	<nb_searches>0</nb_searches>
 	<nb_keywords>0</nb_keywords>
+	<avg_time_generation>0</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageTitles_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageTitles_day.xml
index 1179612cd48dee1bc7d2ee59beadca89aeeb8d0c..5302932c1d5da7758ce9b7010a61a3e1353c6be7 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageTitles_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageTitles_day.xml
@@ -5,6 +5,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -13,6 +14,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label> Purchasing...</label>
@@ -20,6 +22,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -30,6 +33,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 			</row>
 		</subtable>
 	</row>
@@ -39,6 +43,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>7</entry_nb_actions>
@@ -47,5 +52,6 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageUrls_day.xml
index 7fa327713e74d80baae7ce337d860854859537b1..b7e57ccfe17195a18939ca3921324ffecac930ac 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageUrls_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getEntryPageUrls_day.xml
@@ -6,6 +6,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>7</entry_nb_actions>
@@ -14,6 +15,7 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 		<url>http://example.org/index.htm?parameter=Should display</url>
 	</row>
 	<row>
@@ -21,6 +23,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -29,6 +32,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label>/purchase.htm</label>
@@ -36,6 +40,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -46,6 +51,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 				<url>http://example.org/store/purchase.htm</url>
 			</row>
 		</subtable>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageTitles_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageTitles_day.xml
index 2ee22ef5cf92f06fcedba694020fbd4a79443cbc..326ba6eef512bdf73f2d3286668c4a919bca190e 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageTitles_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageTitles_day.xml
@@ -5,6 +5,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -13,6 +14,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label> Purchasing...</label>
@@ -20,6 +22,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -30,6 +33,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 			</row>
 		</subtable>
 	</row>
@@ -39,10 +43,12 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.023</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageUrls_day.xml
index 943302c205753903472cd4a6888bf39112307365..17dda0f1d27f5836a131aa142750af9ee20bcb62 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageUrls_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getExitPageUrls_day.xml
@@ -6,11 +6,13 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.023</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 	<row>
@@ -18,6 +20,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -26,6 +29,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label>/purchase.htm</label>
@@ -33,6 +37,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -43,6 +48,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 				<url>http://example.org/store/purchase.htm</url>
 			</row>
 		</subtable>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitle_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitle_day.xml
index 07ef5d536a6b6d692306c79bf0d658d3eee757b3..67384a3686736614babc99069b92709c13e2bf14 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitle_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitle_day.xml
@@ -6,6 +6,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
@@ -16,5 +17,6 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitles_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitles_day.xml
index e3df8a41dd4ec9a257e804704f182b65183f62e8..645386656465ae4b316c3b09b276ccc8e7aa02e9 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitles_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageTitles_day.xml
@@ -5,6 +5,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -13,6 +14,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label> Purchasing...</label>
@@ -20,6 +22,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -30,6 +33,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 			</row>
 		</subtable>
 	</row>
@@ -39,6 +43,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>7</entry_nb_actions>
@@ -47,6 +52,7 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 	</row>
 	<row>
 		<label> Looking at homepage (again)...</label>
@@ -54,11 +60,13 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.023</avg_time_generation>
 	</row>
 	<row>
 		<label> Second page view - should be registered as URL</label>
@@ -66,8 +74,10 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>900</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<avg_time_on_page>900</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.224</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrl_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrl_day.xml
index cee7b54dd805e4630f9d7fd54e831da2031e2467..ac40ada8abb6e147cf5f64825289aadad53f5166 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrl_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrl_day.xml
@@ -6,11 +6,13 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.023</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrls_day.xml
index 838606a12ec31674138ac048bb7b3d3b974012a6..a6f79cf627937dfb25ecef10ca581a17fecd9a66 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrls_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.getPageUrls_day.xml
@@ -6,9 +6,11 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.224</avg_time_generation>
 		<url>http://example.org/</url>
 	</row>
 	<row>
@@ -17,11 +19,13 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.023</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 	<row>
@@ -30,6 +34,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>7</entry_nb_actions>
@@ -38,6 +43,7 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 		<url>http://example.org/index.htm?parameter=Should display</url>
 	</row>
 	<row>
@@ -45,6 +51,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -53,6 +60,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label>/purchase.htm</label>
@@ -60,6 +68,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -70,6 +79,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 				<url>http://example.org/store/purchase.htm</url>
 			</row>
 		</subtable>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.get_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.get_day.xml
index a3d15825bc227aee50d0743072fc8336c4182090..e04ea4296da6850f7aa2791045d3f9f807b9407d 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__Actions.get_day.xml
@@ -8,4 +8,5 @@
 	<nb_uniq_outlinks>2</nb_uniq_outlinks>
 	<nb_searches>0</nb_searches>
 	<nb_keywords>0</nb_keywords>
+	<avg_time_generation>0.155</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml
index e1486cad9f9e3d68ff1cf8dbc905d5d560bc86b8..18705c4fe7bd03bcf5b38b7b8816ffea85ae9ee1 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml
@@ -14,6 +14,7 @@
 			<bounce_rate>Bounce Rate</bounce_rate>
 			<avg_time_on_page>Avg. time on page</avg_time_on_page>
 			<exit_rate>Exit rate</exit_rate>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 		</metrics>
 		<metricsDocumentation>
 			<nb_hits>The number of times this page was visited.</nb_hits>
@@ -21,6 +22,7 @@
 			<bounce_rate>The percentage of visits that started on this page and left the website straight away.</bounce_rate>
 			<avg_time_on_page>The average amount of time visitors spent on this page (only the page, not the entire website).</avg_time_on_page>
 			<exit_rate>The percentage of visits that left the website after viewing this page.</exit_rate>
+			<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
 		</metricsDocumentation>
 		<documentation>This report contains information about the page URLs that have been visited. &lt;br /&gt; The table is organized hierarchically, the URLs are displayed as a folder structure.&lt;br /&gt;Use the plus and minus icons on the left to navigate.</documentation>
 		<actionToLoadSubTables>getPageUrls</actionToLoadSubTables>
@@ -35,6 +37,7 @@
 		<bounce_rate>Bounce Rate</bounce_rate>
 		<avg_time_on_page>Avg. time on page</avg_time_on_page>
 		<exit_rate>Exit rate</exit_rate>
+		<avg_time_generation>Avg. generation time</avg_time_generation>
 	</columns>
 	<reportData>
 		<row>
@@ -44,6 +47,7 @@
 			<avg_time_on_page>00:00:00</avg_time_on_page>
 			<bounce_rate>100%</bounce_rate>
 			<exit_rate>100%</exit_rate>
+			<avg_time_generation>00:00:00.13</avg_time_generation>
 		</row>
 	</reportData>
 	<reportMetadata>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_csv__API.get_month.csv b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_csv__API.get_month.csv
index 8658ec505fccd953c176ff6568b9a13c1883e583..aff956dc4c4e0aa8cbc781a66879eace13ec4964 100755
Binary files a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_csv__API.get_month.csv and b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_csv__API.get_month.csv differ
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageTitles_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageTitles_day.xml
index 8d363360e0dbc50411872a85768290610504d3fa..cef5f1db673c2949eef6669a2ffdb2f5d0317a99 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageTitles_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageTitles_day.xml
@@ -5,6 +5,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -13,6 +14,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label> Purchasing...</label>
@@ -20,6 +22,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -30,6 +33,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 			</row>
 		</subtable>
 	</row>
@@ -39,6 +43,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>8</entry_nb_actions>
@@ -47,5 +52,6 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageUrls_day.xml
index 170597cbf25131939726835eafdb33fc2732e096..fcc2cd595b982ecacf95529008ce9bdca1677049 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageUrls_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getEntryPageUrls_day.xml
@@ -6,6 +6,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>8</entry_nb_actions>
@@ -14,6 +15,7 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 		<url>http://example.org/index.htm?parameter=Should display</url>
 	</row>
 	<row>
@@ -21,6 +23,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -29,6 +32,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label>/purchase.htm</label>
@@ -36,6 +40,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -46,6 +51,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 				<url>http://example.org/store/purchase.htm</url>
 			</row>
 		</subtable>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageTitles_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageTitles_day.xml
index 6ae7565bce0d9bd0c707ffe60be5be1959bd391b..faa38edcf3aff03a7703b818de5293e1957bd993 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageTitles_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageTitles_day.xml
@@ -5,6 +5,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -13,6 +14,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label> Purchasing...</label>
@@ -20,6 +22,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -30,6 +33,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 			</row>
 		</subtable>
 	</row>
@@ -40,10 +44,12 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageUrls_day.xml
index 4ebb7702a1f710101f7e4e0900ca734128512241..82d409ed097cc7ff79dcac4607ad1901075006f8 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageUrls_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getExitPageUrls_day.xml
@@ -7,11 +7,13 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 	<row>
@@ -19,6 +21,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -27,6 +30,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label>/purchase.htm</label>
@@ -34,6 +38,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -44,6 +49,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 				<url>http://example.org/store/purchase.htm</url>
 			</row>
 		</subtable>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitle_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitle_day.xml
index 07ef5d536a6b6d692306c79bf0d658d3eee757b3..67384a3686736614babc99069b92709c13e2bf14 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitle_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitle_day.xml
@@ -6,6 +6,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
@@ -16,5 +17,6 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitlesFollowingSiteSearch_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitlesFollowingSiteSearch_day.xml
index 5e682370b70a28e43fd84c84495d28ccf6061926..b7dd92869029ec858e89d0e28e33346fd9eba464 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitlesFollowingSiteSearch_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitlesFollowingSiteSearch_day.xml
@@ -7,10 +7,12 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitles_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitles_day.xml
index f13f6b18c5de73fe507f98dd13c2d59d352c2c74..6615b7d1a3057910f83768f1ea8dc090b4bedc1d 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitles_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageTitles_day.xml
@@ -5,6 +5,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -13,6 +14,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label> Purchasing...</label>
@@ -20,6 +22,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -30,6 +33,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 			</row>
 		</subtable>
 	</row>
@@ -39,6 +43,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>8</entry_nb_actions>
@@ -47,6 +52,7 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 	</row>
 	<row>
 		<label> Looking at homepage after site search...</label>
@@ -55,11 +61,13 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 	</row>
 	<row>
 		<label> Second page view - should be registered as URL</label>
@@ -67,8 +75,10 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>792</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<avg_time_on_page>792</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.224</avg_time_generation>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrl_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrl_day.xml
index 231c9e36f912533c48be95c6da8cd1e60fbea5c4..e93472d54c7281d6e8f106684ebbf6250f623f31 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrl_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrl_day.xml
@@ -7,11 +7,13 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrlsFollowingSiteSearch_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrlsFollowingSiteSearch_day.xml
index 231c9e36f912533c48be95c6da8cd1e60fbea5c4..e93472d54c7281d6e8f106684ebbf6250f623f31 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrlsFollowingSiteSearch_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrlsFollowingSiteSearch_day.xml
@@ -7,11 +7,13 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrls_day.xml
index 53334ac973bb84f30c2cc2092812d0db4a86eb78..ab5b0e8d3ac3349b29f01997cef8e3101f14bbbc 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrls_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.getPageUrls_day.xml
@@ -6,9 +6,11 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.224</avg_time_generation>
 		<url>http://example.org/</url>
 	</row>
 	<row>
@@ -18,11 +20,13 @@
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
 		<nb_hits_following_search>1</nb_hits_following_search>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
 		<exit_nb_visits>1</exit_nb_visits>
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.024</avg_time_generation>
 		<url>http://example.org/index.htm</url>
 	</row>
 	<row>
@@ -31,6 +35,7 @@
 		<nb_uniq_visitors>1</nb_uniq_visitors>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>180</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>8</entry_nb_actions>
@@ -39,6 +44,7 @@
 		<avg_time_on_page>180</avg_time_on_page>
 		<bounce_rate>0%</bounce_rate>
 		<exit_rate>0%</exit_rate>
+		<avg_time_generation>0.234</avg_time_generation>
 		<url>http://example.org/index.htm?parameter=Should display</url>
 	</row>
 	<row>
@@ -46,6 +52,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_hits>1</nb_hits>
 		<sum_time_spent>0</sum_time_spent>
+		<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 		<entry_nb_visits>1</entry_nb_visits>
 		<entry_nb_actions>1</entry_nb_actions>
 		<entry_sum_visit_length>0</entry_sum_visit_length>
@@ -54,6 +61,7 @@
 		<avg_time_on_page>0</avg_time_on_page>
 		<bounce_rate>100%</bounce_rate>
 		<exit_rate>100%</exit_rate>
+		<avg_time_generation>0.134</avg_time_generation>
 		<subtable>
 			<row>
 				<label>/purchase.htm</label>
@@ -61,6 +69,7 @@
 				<nb_uniq_visitors>1</nb_uniq_visitors>
 				<nb_hits>1</nb_hits>
 				<sum_time_spent>0</sum_time_spent>
+				<nb_hits_with_time_generation>1</nb_hits_with_time_generation>
 				<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
 				<entry_nb_visits>1</entry_nb_visits>
 				<entry_nb_actions>1</entry_nb_actions>
@@ -71,6 +80,7 @@
 				<avg_time_on_page>0</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
+				<avg_time_generation>0.134</avg_time_generation>
 				<url>http://example.org/store/purchase.htm</url>
 			</row>
 		</subtable>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.get_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.get_day.xml
index 51d95b38b370e3ee5681a636e34ac207a5099a44..0eea12ac0b1155878fccabc0b36b12bb72e01b7e 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__Actions.get_day.xml
@@ -8,4 +8,5 @@
 	<nb_uniq_outlinks>2</nb_uniq_outlinks>
 	<nb_searches>1</nb_searches>
 	<nb_keywords>1</nb_keywords>
+	<avg_time_generation>0.155</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_day.xml
index c47c5efa5e7b2e1f895fc8e529346440a9e5af12..dd08895057cd3fa5cfb6c3c4884be5058a55896a 100644
--- a/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_day.xml
@@ -16,6 +16,7 @@
 			<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 			<nb_searches>Searches</nb_searches>
 			<nb_keywords>Unique Keywords</nb_keywords>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 		</metrics>
 		<metricsDocumentation>
 			<nb_pageviews>The number of times this page was visited.</nb_pageviews>
@@ -25,6 +26,7 @@
 			<nb_outlinks>The number of times this link was clicked.</nb_outlinks>
 			<nb_uniq_outlinks>The number of visits that involved a click on this link. If a link was clicked multiple times during one visit, it is only counted once.</nb_uniq_outlinks>
 			<nb_searches>The number of visits that searched for this keyword on your website's search engine.</nb_searches>
+			<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
 		</metricsDocumentation>
 		<imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2010-01-03,2010-01-09</imageGraphUrl>
 		<imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2010-01-03,2010-01-09</imageGraphEvolutionUrl>
@@ -39,6 +41,7 @@
 		<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 		<nb_searches>Searches</nb_searches>
 		<nb_keywords>Unique Keywords</nb_keywords>
+		<avg_time_generation>Avg. generation time</avg_time_generation>
 	</columns>
 	<reportData>
 		<result prettyDate="Sunday 3 January 2010">
@@ -46,6 +49,7 @@
 			<nb_pageviews>4</nb_pageviews>
 			<nb_searches>5</nb_searches>
 			<nb_uniq_pageviews>3</nb_uniq_pageviews>
+			<avg_time_generation>00:00:00</avg_time_generation>
 			<nb_downloads>0</nb_downloads>
 			<nb_uniq_downloads>0</nb_uniq_downloads>
 			<nb_outlinks>0</nb_outlinks>
@@ -54,6 +58,7 @@
 		<result prettyDate="Monday 4 January 2010">
 			<nb_keywords>3</nb_keywords>
 			<nb_searches>3</nb_searches>
+			<avg_time_generation>00:00:00</avg_time_generation>
 			<nb_pageviews>0</nb_pageviews>
 			<nb_uniq_pageviews>0</nb_uniq_pageviews>
 			<nb_downloads>0</nb_downloads>
diff --git a/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_month.xml
index 637679119de58ed74f143a24b9c99b8b52071d0f..19a2a7a2f1a528e531b16f05a1e940ad189a08b7 100644
--- a/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_SiteSearch_Actions.get_firstSite_lastN__API.getProcessedReport_month.xml
@@ -16,6 +16,7 @@
 			<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 			<nb_searches>Searches</nb_searches>
 			<nb_keywords>Unique Keywords</nb_keywords>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 		</metrics>
 		<metricsDocumentation>
 			<nb_pageviews>The number of times this page was visited.</nb_pageviews>
@@ -25,6 +26,7 @@
 			<nb_outlinks>The number of times this link was clicked.</nb_outlinks>
 			<nb_uniq_outlinks>The number of visits that involved a click on this link. If a link was clicked multiple times during one visit, it is only counted once.</nb_uniq_outlinks>
 			<nb_searches>The number of visits that searched for this keyword on your website's search engine.</nb_searches>
+			<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
 		</metricsDocumentation>
 		<imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=month&amp;date=2010-01-03,2010-07-03</imageGraphUrl>
 		<imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=month&amp;date=2010-01-03,2010-07-03</imageGraphEvolutionUrl>
@@ -39,6 +41,7 @@
 		<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 		<nb_searches>Searches</nb_searches>
 		<nb_keywords>Unique Keywords</nb_keywords>
+		<avg_time_generation>Avg. generation time</avg_time_generation>
 	</columns>
 	<reportData>
 		<result prettyDate="2010, January">
@@ -46,6 +49,7 @@
 			<nb_pageviews>4</nb_pageviews>
 			<nb_searches>8</nb_searches>
 			<nb_uniq_pageviews>3</nb_uniq_pageviews>
+			<avg_time_generation>00:00:00</avg_time_generation>
 			<nb_downloads>0</nb_downloads>
 			<nb_uniq_downloads>0</nb_uniq_downloads>
 			<nb_outlinks>0</nb_outlinks>
diff --git a/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_day.xml b/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_day.xml
index f82b97b135c885305a3dbb7c7450ce5162e1d841..dfa32df4694ddeb978ceb77940292b89614f155d 100644
--- a/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_day.xml
@@ -6,10 +6,12 @@
 			<nb_pageviews>4</nb_pageviews>
 			<nb_searches>5</nb_searches>
 			<nb_uniq_pageviews>3</nb_uniq_pageviews>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-01-04">
 			<nb_keywords>3</nb_keywords>
 			<nb_searches>3</nb_searches>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-01-05" />
 		<result date="2010-01-06" />
@@ -23,6 +25,7 @@
 			<nb_pageviews>2</nb_pageviews>
 			<nb_searches>3</nb_searches>
 			<nb_uniq_pageviews>2</nb_uniq_pageviews>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-01-04" />
 		<result date="2010-01-05" />
@@ -35,6 +38,7 @@
 		<result date="2010-01-03">
 			<nb_pageviews>3</nb_pageviews>
 			<nb_uniq_pageviews>3</nb_uniq_pageviews>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-01-04" />
 		<result date="2010-01-05" />
diff --git a/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_month.xml b/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_month.xml
index bd1427d6766ec2b93b56a5342c7abea10b137ed9..56b93eb2579fd6a4124b03f41a9f527262c9b1f2 100644
--- a/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_SiteSearch_AllSites__Actions.get_month.xml
@@ -6,6 +6,7 @@
 			<nb_pageviews>4</nb_pageviews>
 			<nb_searches>8</nb_searches>
 			<nb_uniq_pageviews>3</nb_uniq_pageviews>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-02" />
 		<result date="2010-03" />
@@ -20,6 +21,7 @@
 			<nb_pageviews>2</nb_pageviews>
 			<nb_searches>3</nb_searches>
 			<nb_uniq_pageviews>2</nb_uniq_pageviews>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-02" />
 		<result date="2010-03" />
@@ -32,6 +34,7 @@
 		<result date="2010-01">
 			<nb_pageviews>3</nb_pageviews>
 			<nb_uniq_pageviews>3</nb_uniq_pageviews>
+			<avg_time_generation>0</avg_time_generation>
 		</result>
 		<result date="2010-02" />
 		<result date="2010-03" />
diff --git a/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_day.xml b/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_day.xml
index a5e5d16d73ed6ed2ce4d1cf9dc6ba246c09d3f8c..f125336842cf89ac352daa730af4ee35df294d1a 100644
--- a/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_day.xml
@@ -8,4 +8,5 @@
 	<nb_uniq_outlinks>0</nb_uniq_outlinks>
 	<nb_searches>5</nb_searches>
 	<nb_keywords>3</nb_keywords>
+	<avg_time_generation>0</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_month.xml b/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_month.xml
index f1ac62185180c7fafd526d8ee97a085c4a7566ce..9d598b649a2d8018ce1bd139d5dcf35cf333e9aa 100644
--- a/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_SiteSearch_NotLastNPeriods__Actions.get_month.xml
@@ -8,4 +8,5 @@
 	<nb_uniq_outlinks>0</nb_uniq_outlinks>
 	<nb_searches>8</nb_searches>
 	<nb_keywords>5</nb_keywords>
+	<avg_time_generation>0</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml
index ac7ae818e8d94a8605f5519eec9f6ab6ae67799b..78fcaa8aabd9de918ebe4fff7c1caf360447af27 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml
@@ -48,7 +48,7 @@
 				<avg_time_on_page>00:00:00</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>50%</exit_rate>
-				<avg_time_generation>00:00:00.138</avg_time_generation>
+				<avg_time_generation>00:00:00.13</avg_time_generation>
 			</row>
 		</result>
 		<result prettyDate="Monday 4 January 2010">
@@ -59,7 +59,7 @@
 				<avg_time_on_page>00:00:00</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>0%</exit_rate>
-				<avg_time_generation>00:00:00.223</avg_time_generation>
+				<avg_time_generation>00:00:00.22</avg_time_generation>
 			</row>
 		</result>
 		<result prettyDate="Tuesday 5 January 2010">
@@ -70,7 +70,7 @@
 				<avg_time_on_page>00:07:30</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>0%</exit_rate>
-				<avg_time_generation>00:00:00.248</avg_time_generation>
+				<avg_time_generation>00:00:00.24</avg_time_generation>
 			</row>
 			<row>
 				<label>Checkout</label>
@@ -79,7 +79,7 @@
 				<avg_time_on_page>00:00:00</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>100%</exit_rate>
-				<avg_time_generation>00:00:00.452</avg_time_generation>
+				<avg_time_generation>00:00:00.45</avg_time_generation>
 			</row>
 		</result>
 		<result prettyDate="Wednesday 6 January 2010" />
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml
index cc395e7b7db0da618183bb4f97d584b6fffe0020..f8dd51fa8dbb930174c68705f7a3ae4f2c48bc6b 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml
@@ -48,7 +48,7 @@
 				<avg_time_on_page>00:00:00</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>0%</exit_rate>
-				<avg_time_generation>00:00:00.123</avg_time_generation>
+				<avg_time_generation>00:00:00.12</avg_time_generation>
 			</row>
 			<row>
 				<label>/products</label>
@@ -57,7 +57,7 @@
 				<avg_time_on_page>00:00:00</avg_time_on_page>
 				<bounce_rate>100%</bounce_rate>
 				<exit_rate>100%</exit_rate>
-				<avg_time_generation>00:00:00.153</avg_time_generation>
+				<avg_time_generation>00:00:00.15</avg_time_generation>
 			</row>
 		</result>
 		<result prettyDate="Monday 4 January 2010">
@@ -68,7 +68,7 @@
 				<avg_time_on_page>00:00:00</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>0%</exit_rate>
-				<avg_time_generation>00:00:00.223</avg_time_generation>
+				<avg_time_generation>00:00:00.22</avg_time_generation>
 			</row>
 		</result>
 		<result prettyDate="Tuesday 5 January 2010">
@@ -79,7 +79,7 @@
 				<avg_time_on_page>00:06:00</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>0%</exit_rate>
-				<avg_time_generation>00:00:00.323</avg_time_generation>
+				<avg_time_generation>00:00:00.32</avg_time_generation>
 			</row>
 			<row>
 				<label>/thankyou</label>
@@ -88,7 +88,7 @@
 				<avg_time_on_page>00:06:00</avg_time_on_page>
 				<bounce_rate>0%</bounce_rate>
 				<exit_rate>100%</exit_rate>
-				<avg_time_generation>00:00:00.313</avg_time_generation>
+				<avg_time_generation>00:00:00.31</avg_time_generation>
 			</row>
 			<row>
 				<label>Page URL not defined</label>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html
index 7ca0bbd3406c6e2b875b5c91b840385a630fcef9..5399b6717586d90bb2555613bd166343d3026a8d 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html
@@ -1854,6 +1854,14 @@ Unique Keywords
 0
 </td>
 </tr>
+<tr style="">
+<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
+Avg. generation time
+</td>
+<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
+00:00:00.24
+</td>
+</tr>
 </tbody>
 </table>
 <br/>
@@ -1910,7 +1918,7 @@ Page URLs
 0%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.223
+00:00:00.22
 </td>
 </tr>
 <tr style="background-color: rgb(249,250,250)">
@@ -1935,7 +1943,7 @@ Page URL not defined
 0%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.223
+00:00:00.22
 </td>
 </tr>
 <tr style="">
@@ -1960,7 +1968,7 @@ Page URL not defined
 100%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.153
+00:00:00.15
 </td>
 </tr>
 <tr style="background-color: rgb(249,250,250)">
@@ -1985,7 +1993,7 @@ Page URL not defined
 100%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.313
+00:00:00.31
 </td>
 </tr>
 </tbody>
@@ -2156,7 +2164,7 @@ first page view
 50%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.138
+00:00:00.13
 </td>
 </tr>
 <tr style="background-color: rgb(249,250,250)">
@@ -2179,7 +2187,7 @@ second visitor
 0%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.248
+00:00:00.24
 </td>
 </tr>
 <tr style="">
@@ -2202,7 +2210,7 @@ Checkout
 100%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.452
+00:00:00.45
 </td>
 </tr>
 <tr style="background-color: rgb(249,250,250)">
@@ -2225,7 +2233,7 @@ Page Name not defined
 0%
 </td>
 <td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00.223
+00:00:00.22
 </td>
 </tr>
 </tbody>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf
index ab5c573a1a0b7fcc91fca9c561d0a9fab548d6fe..b4254232b8b96df7e20e39dbe4c83d1629ce82d6 100644
Binary files a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf and b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf differ
diff --git a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
index 6dbe54bde75b77dd0ed0efb69320b698dfa2e9cc..f4f69aa3a901aab6b4631ee1a0aac88af939cf23 100644
--- a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
@@ -391,6 +391,7 @@
 			<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 			<nb_searches>Searches</nb_searches>
 			<nb_keywords>Unique Keywords</nb_keywords>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 		</metrics>
 		<metricsDocumentation>
 			<nb_pageviews>The number of times this page was visited.</nb_pageviews>
@@ -400,6 +401,7 @@
 			<nb_outlinks>The number of times this link was clicked.</nb_outlinks>
 			<nb_uniq_outlinks>The number of visits that involved a click on this link. If a link was clicked multiple times during one visit, it is only counted once.</nb_uniq_outlinks>
 			<nb_searches>The number of visits that searched for this keyword on your website's search engine.</nb_searches>
+			<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
 		</metricsDocumentation>
 		<imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2008-12-06,2009-01-04</imageGraphUrl>
 		<imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2008-12-06,2009-01-04</imageGraphEvolutionUrl>
@@ -1824,6 +1826,7 @@
 			<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 			<nb_searches>Searches</nb_searches>
 			<nb_keywords>Unique Keywords</nb_keywords>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 			<nb_visits_returning>Returning Visits</nb_visits_returning>
 			<nb_actions_returning>Actions by Returning Visits</nb_actions_returning>
 			<avg_time_on_site_returning>Avg. Duration of a Returning Visit (in sec)</avg_time_on_site_returning>
@@ -1849,6 +1852,7 @@
 			<nb_outlinks>The number of times this link was clicked.</nb_outlinks>
 			<nb_uniq_outlinks>The number of visits that involved a click on this link. If a link was clicked multiple times during one visit, it is only counted once.</nb_uniq_outlinks>
 			<nb_searches>The number of visits that searched for this keyword on your website's search engine.</nb_searches>
+			<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
 		</metricsDocumentation>
 		<uniqueId>API_get</uniqueId>
 	</row>
diff --git a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.get_day.xml b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.get_day.xml
index 33cec8dbe38fb0f69d6a3088fe718e55300bec43..71adf6224709a293d574362698b2bdca1ad38bfa 100644
--- a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata__API.get_day.xml
@@ -25,4 +25,5 @@
 	<nb_uniq_outlinks>0</nb_uniq_outlinks>
 	<nb_searches>0</nb_searches>
 	<nb_keywords>0</nb_keywords>
+	<avg_time_generation>0</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getMetadata_day.xml b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getMetadata_day.xml
index 8e3b587e502ca219e2b67abb69654fce702ac56f..590b2acbe5f84f5409da17da7a2b8ee7a6cbd073 100755
--- a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getMetadata_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getMetadata_day.xml
@@ -14,6 +14,7 @@
 			<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 			<nb_searches>Searches</nb_searches>
 			<nb_keywords>Unique Keywords</nb_keywords>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 		</metrics>
 		<imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2008-12-06,2009-01-04</imageGraphUrl>
 		<imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2008-12-06,2009-01-04</imageGraphEvolutionUrl>
diff --git a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getProcessedReport_day.xml
index 978bb0f4646b12de7717e13bc62fdcecfe9cd19e..52ded0385cccaf6848fbc92df39023912e1e82f2 100755
--- a/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_apiGetReportMetadata_hideMetricsDoc__API.getProcessedReport_day.xml
@@ -16,6 +16,7 @@
 			<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 			<nb_searches>Searches</nb_searches>
 			<nb_keywords>Unique Keywords</nb_keywords>
+			<avg_time_generation>Avg. generation time</avg_time_generation>
 		</metrics>
 		<imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2008-12-06,2009-01-04</imageGraphUrl>
 		<imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=Actions&amp;apiAction=get&amp;period=day&amp;date=2008-12-06,2009-01-04</imageGraphEvolutionUrl>
@@ -30,6 +31,7 @@
 		<nb_uniq_outlinks>Unique Outlinks</nb_uniq_outlinks>
 		<nb_searches>Searches</nb_searches>
 		<nb_keywords>Unique Keywords</nb_keywords>
+		<avg_time_generation>Avg. generation time</avg_time_generation>
 	</columns>
 	<reportData>
 		<nb_pageviews>1</nb_pageviews>
@@ -40,6 +42,7 @@
 		<nb_uniq_outlinks>0</nb_uniq_outlinks>
 		<nb_searches>0</nb_searches>
 		<nb_keywords>0</nb_keywords>
+		<avg_time_generation>00:00:00</avg_time_generation>
 	</reportData>
 	<reportMetadata />
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html
index aaa75b3f2ab3492e70c03a98a2048ec5427226cd..c21f52d8684944a3a3053a78ab3f8806f1034fdc 100644
--- a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html
+++ b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html
@@ -3177,6 +3177,14 @@ Unique Keywords
 0
 </td>
 </tr>
+<tr style="">
+<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
+Avg. generation time
+</td>
+<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
+00:00:00
+</td>
+</tr>
 </tbody>
 </table>
 <br/>
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf
index f1d5eeeeb7ef44846165b71bb81182451115bf87..481bdf6290d28b671fc11f473b6c5967dadcf686 100644
Binary files a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf and b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf differ
diff --git a/tests/PHPUnit/Integration/expected/test_noVisit__Actions.get_day.xml b/tests/PHPUnit/Integration/expected/test_noVisit__Actions.get_day.xml
index 6006b449a7486f35374de7cfb91eaa76b6269e9d..6eb4818cbad968b1622a0528456c868297e13c8f 100644
--- a/tests/PHPUnit/Integration/expected/test_noVisit__Actions.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_noVisit__Actions.get_day.xml
@@ -8,4 +8,5 @@
 	<nb_uniq_outlinks>0</nb_uniq_outlinks>
 	<nb_searches>0</nb_searches>
 	<nb_keywords>0</nb_keywords>
+	<avg_time_generation>0</avg_time_generation>
 </result>
\ No newline at end of file
diff --git a/themes/default/common.css b/themes/default/common.css
index 63862081635efc36cbf517c1ea16e252f7886be7..8dd56cb6220517f1a359d24de52f8b0463ddd974 100644
--- a/themes/default/common.css
+++ b/themes/default/common.css
@@ -762,6 +762,12 @@ table.entityTable tr td a {
 	margin: 0 0 2px 0;
 }
 
+body .ui-tooltip.small {
+    font-size: 11px;
+    padding: 3px 5px 3px 6px;
+}
+
+
 
 /* Popover */