Skip to content
Extraits de code Groupes Projets
Valider a87d1691 rédigé par Benaka Moorthi's avatar Benaka Moorthi
Parcourir les fichiers

Fix the new archive query benchmark.

parent 97689b2d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,7 +19,8 @@ class ArchiveQueryBenchmark extends BenchmarkTestCase ...@@ -19,7 +19,8 @@ class ArchiveQueryBenchmark extends BenchmarkTestCase
$archivingTables = Piwik::getTablesArchivesInstalled(); $archivingTables = Piwik::getTablesArchivesInstalled();
if (empty($archivingTables)) { if (empty($archivingTables)) {
$this->archivingLaunched = true; $this->archivingLaunched = true;
$this->launchArchiving(); Piwik_VisitsSummary_API::getInstance()->get(
self::$fixture->idSite, self::$fixture->period, self::$fixture->date);
} }
} }
...@@ -29,15 +30,15 @@ class ArchiveQueryBenchmark extends BenchmarkTestCase ...@@ -29,15 +30,15 @@ class ArchiveQueryBenchmark extends BenchmarkTestCase
*/ */
public function testArchivingProcess() public function testArchivingProcess()
{ {
echo "NOTE: Had to archive tables, memory results will not be accurate. Run again for better results."; if ($this->archivingLaunched) {
echo "NOTE: Had to archive tables, memory results will not be accurate. Run again for better results.";
}
Piwik_ArchiveProcessing::$forceDisableArchiving = true; Piwik_ArchiveProcessing::$forceDisableArchiving = true;
$this->launchArchiving();
} $period = Piwik_Period::factory(self::$fixture->period, Piwik_Date::factory(self::$fixture->date));
$dateRange = $period->getDateStart().','.$period->getDateEnd();
private function launchArchiving()
{ Piwik_VisitsSummary_API::getInstance()->get(self::$fixture->idSite, 'day', $dateRange);
Piwik_VisitsSummary_API::getInstance()->get(
self::$fixture->idSite, self::$fixture->period, self::$fixture->date);
} }
} }
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter