diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-11-05 01:17:10 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-11-05 01:17:10 +0400 |
commit | f226904b1ef360c35f2e42dbc685f5db3d41a1fb (patch) | |
tree | 28583d35d9874391fcad900957b3450a36cda1fc /plugins/UserCountry | |
parent | b56b6b83d17ddb99f680ac5cebbb2c9d9ddf3f93 (diff) |
Renaming archive helpers Reports->Records + move getMetricsForDimension to Logaggregator
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/Archiver.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/UserCountry/Archiver.php b/plugins/UserCountry/Archiver.php index 36981cd2ca..c89fe97afa 100644 --- a/plugins/UserCountry/Archiver.php +++ b/plugins/UserCountry/Archiver.php @@ -53,7 +53,7 @@ class Archiver extends \Piwik\Plugin\Archiver } $this->aggregateFromVisits(); $this->aggregateFromConversions(); - $this->recordDayReports(); + $this->insertDayReports(); } protected function aggregateFromVisits() @@ -69,7 +69,6 @@ class Archiver extends \Piwik\Plugin\Archiver $this->makeRegionCityLabelsUnique($row); $this->rememberCityLatLong($row); - /* @var $dataArray DataArray */ foreach ($this->arrays as $dimension => $dataArray) { $dataArray->sumMetricsVisits($row[$dimension], $row); } @@ -129,20 +128,21 @@ class Archiver extends \Piwik\Plugin\Archiver } } - protected function recordDayReports() + protected function insertDayReports() { $tableCountry = $this->arrays[self::COUNTRY_FIELD]->asDataTable(); - $this->getProcessor()->insertBlobRecord(self::COUNTRY_RECORD_NAME, $tableCountry->getSerialized()); $this->getProcessor()->insertNumericRecord(self::DISTINCT_COUNTRIES_METRIC, $tableCountry->getRowsCount()); + $report = $tableCountry->getSerialized(); + $this->getProcessor()->insertBlobRecord(self::COUNTRY_RECORD_NAME, $report); $tableRegion = $this->arrays[self::REGION_FIELD]->asDataTable(); - $serialized = $tableRegion->getSerialized($this->maximumRows, $this->maximumRows, Metrics::INDEX_NB_VISITS); - $this->getProcessor()->insertBlobRecord(self::REGION_RECORD_NAME, $serialized); + $report = $tableRegion->getSerialized($this->maximumRows, $this->maximumRows, Metrics::INDEX_NB_VISITS); + $this->getProcessor()->insertBlobRecord(self::REGION_RECORD_NAME, $report); $tableCity = $this->arrays[self::CITY_FIELD]->asDataTable(); $this->setLatitudeLongitude($tableCity); - $serialized = $tableCity->getSerialized($this->maximumRows, $this->maximumRows, Metrics::INDEX_NB_VISITS); - $this->getProcessor()->insertBlobRecord(self::CITY_RECORD_NAME, $serialized); + $report = $tableCity->getSerialized($this->maximumRows, $this->maximumRows, Metrics::INDEX_NB_VISITS); + $this->getProcessor()->insertBlobRecord(self::CITY_RECORD_NAME, $report); } /** @@ -174,7 +174,7 @@ class Archiver extends \Piwik\Plugin\Archiver self::CITY_RECORD_NAME, ); - $nameToCount = $this->getProcessor()->aggregateDataTableReports($dataTableToSum); + $nameToCount = $this->getProcessor()->aggregateDataTableRecords($dataTableToSum); $this->getProcessor()->insertNumericRecord(self::DISTINCT_COUNTRIES_METRIC, $nameToCount[self::COUNTRY_RECORD_NAME]['level0']); } |