diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 9e57eeb4cb4..09c83a636f0 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -203,7 +203,7 @@ class W3cExtendedFormat(RegexFormat): 'sc-bytes': '(?P\S+)', 'cs-host': '(?P\S+)', 'cs-username': '(?P\S+)', - 'time-taken': '(?P\d+)' + 'time-taken': '(?P[.\d]+)' } def __init__(self): @@ -226,24 +226,22 @@ def check_format(self, file): file.seek(0) return + # store the header lines for a later check for IIS + self.header_lines = header_lines + # Parse the 4th 'Fields: ' line to create the regex to use full_regex = [] - expected_fields = W3cExtendedFormat.fields.copy() # turn custom field mapping into field => regex mapping + expected_fields = type(self).fields.copy() # turn custom field mapping into field => regex mapping + + # if the --w3c-time-taken-millisecs option is used, make sure the time-taken field is interpreted as milliseconds + if config.options.w3c_time_taken_in_millisecs: + expected_fields['time-taken'] = '(?P[\d.]+)' + for mapped_field_name, field_name in config.options.custom_w3c_fields.iteritems(): - expected_fields[mapped_field_name] = W3cExtendedFormat.fields[field_name] + expected_fields[mapped_field_name] = type(self).fields[field_name] del expected_fields[field_name] - # if the --w3c-time-taken-secs option is used, make sure the time-taken field is interpreted as seconds - if config.options.w3c_time_taken_in_secs: - expected_fields['time-taken'] = '(?P\S+)' - else: - # check if we're importing netscaler logs and if so, issue a warning - if 'netscaler' in header_lines[1].lower(): - logging.info("WARNING: netscaler log file being parsed without --w3c-time-taken-secs option. Netscaler" - " stores second values in the time-taken field. If your logfile does this, the aforementioned" - " option must be used in order to get accurate generation times.") - # Skip the 'Fields: ' prefix. fields_line = fields_line[9:] for field in fields_line.split(): @@ -252,12 +250,63 @@ def check_format(self, file): except KeyError: regex = '\S+' full_regex.append(regex) - self.regex = re.compile(' '.join(full_regex)) + full_regex = '\s+'.join(full_regex) + self.regex = re.compile(full_regex) - start_pos = file.tell() - len(first_line) - file.seek(start_pos) + file.seek(0) return self.check_format_line(first_line) + def check_for_iis_option(self): + if not config.options.w3c_time_taken_in_millisecs and self._is_time_taken_milli() and self._is_iis(): + logging.info("WARNING: IIS log file being parsed without --w3c-time-taken-milli option. IIS" + " stores millisecond values in the time-taken field. If your logfile does this, the aforementioned" + " option must be used in order to get accurate generation times.") + + def _is_iis(self): + return len([line for line in self.header_lines if 'internet information services' in line.lower() or 'iis' in line.lower()]) > 0 + + def _is_time_taken_milli(self): + return 'generation_time_milli' not in self.regex.pattern + +class IisFormat(W3cExtendedFormat): + + fields = W3cExtendedFormat.fields.copy() + fields.update({ + 'time-taken': '(?P[.\d]+)', + 'sc-win32-status': '(?P<__win32_status>\S+)' # this group is useless for log importing, but capturing it + # will ensure we always select IIS for the format instead of + # W3C logs when detecting the format. This way there will be + # less accidental importing of IIS logs w/o --w3c-time-taken-milli. + }) + + def __init__(self): + super(IisFormat, self).__init__() + + self.name = 'iis' + +class AmazonCloudFrontFormat(W3cExtendedFormat): + + fields = W3cExtendedFormat.fields.copy() + fields.update({ + 'x-event': '(?P\S+)', + 'x-sname': '(?P\S+)', + 'cs-uri-stem': '(?:rtmp:/)?(?P/\S*)', + 'c-user-agent': '(?P".*?"|\S+)' + }) + + def __init__(self): + super(AmazonCloudFrontFormat, self).__init__() + + self.name = 'amazon_cloudfront' + + def get(self, key): + if key == 'event_category' and 'event_category' not in self.matched.groupdict(): + return 'cloudfront_rtmp' + elif key == 'status' and 'status' not in self.matched.groupdict(): + return '200' + else: + return super(AmazonCloudFrontFormat, self).get(key) + _HOST_PREFIX = '(?P[\w\-\.]*)(?::\d+)? ' _COMMON_LOG_FORMAT = ( '(?P\S+) \S+ \S+ \[(?P.*?) (?P.*?)\] ' @@ -281,7 +330,8 @@ def check_format(self, file): 'ncsa_extended': RegexFormat('ncsa_extended', _NCSA_EXTENDED_LOG_FORMAT), 'common_complete': RegexFormat('common_complete', _HOST_PREFIX + _NCSA_EXTENDED_LOG_FORMAT), 'w3c_extended': W3cExtendedFormat(), - 'iis': W3cExtendedFormat(), # for backwards compatibility TODO test + 'amazon_cloudfront': AmazonCloudFrontFormat(), + 'iis': IisFormat(), 's3': RegexFormat('s3', _S3_LOG_FORMAT), 'icecast2': RegexFormat('icecast2', _ICECAST2_LOG_FORMAT), 'nginx_json': JsonFormat('nginx_json'), @@ -518,13 +568,15 @@ def _create_parser(self): '--w3c-map-field', action='callback', callback=self._set_w3c_field_map, type='string', help="Map a custom log entry field in your W3C log to a default one. Use this option to load custom log " "files that use the W3C extended log format such as those from the Advanced Logging W3C module. Used " - "as, eg, --w3c-map-field my-date=date. Recognized default fields include: %s" + "as, eg, --w3c-map-field my-date=date. Recognized default fields include: %s\n\n" + "Formats that extend the W3C extended log format (like the cloudfront RTMP log format) may define more " + "fields that can be mapped." % (', '.join(W3cExtendedFormat.fields.keys())) ) option_parser.add_option( - '--w3c-time-taken-secs', action='store_true', default=False, dest='w3c_time_taken_in_secs', - help="If set, interprets the time-taken W3C log field as a number of seconds. This must be set for importing" - " netscaler logs." + '--w3c-time-taken-millisecs', action='store_true', default=False, dest='w3c_time_taken_in_millisecs', + help="If set, interprets the time-taken W3C log field as a number of milliseconds. This must be set for importing" + " IIS logs." ) return option_parser @@ -536,10 +588,6 @@ def _set_w3c_field_map(self, option, opt_str, value, parser): custom_name, default_name = parts - if default_name not in W3cExtendedFormat.fields: - fatal_error("custom W3C field mapping error: don't know how to parse and use the '%' field" % default_name) - return - if not hasattr(parser.values, 'custom_w3c_fields'): parser.values.custom_w3c_fields = {} @@ -558,9 +606,6 @@ def _parse_args(self, option_parser): print(option_parser.format_help()) sys.exit(1) - if not hasattr(self.options, 'custom_w3c_fields'): - self.options.custom_w3c_fields = {} - # Configure logging before calling logging.{debug,info}. logging.basicConfig( format='%(asctime)s: [%(levelname)s] %(message)s', @@ -598,6 +643,15 @@ def _parse_args(self, option_parser): else: self.format = None + if not hasattr(self.options, 'custom_w3c_fields'): + self.options.custom_w3c_fields = {} + elif self.format is not None: + # validate custom field mappings + for custom_name, default_name in self.options.custom_w3c_fields.iteritems(): + if default_name not in type(format).fields: + fatal_error("custom W3C field mapping error: don't know how to parse and use the '%' field" % default_name) + return + if not self.options.piwik_url: fatal_error('no URL given for Piwik') @@ -1342,7 +1396,15 @@ def _get_hit_args(self, hit): ) if hit.generation_time_milli > 0: - args['gt_ms'] = hit.generation_time_milli + args['gt_ms'] = int(hit.generation_time_milli) + + if hit.event_category and hit.event_action: + args['e_c'] = hit.event_category + args['e_a'] = hit.event_action + + if hit.event_name: + args['e_n'] = hit.event_name + return args def _record_hits(self, hits): @@ -1531,7 +1593,8 @@ def check_format(lineOrFile): match = candidate_format.check_format_line(lineOrFile) else: match = candidate_format.check_format(lineOrFile) - except: + except Exception, e: + logging.debug('Error in format checking: %s', str(e)) pass if match: @@ -1550,6 +1613,11 @@ def check_format(lineOrFile): else: logging.debug('Format %s does not match', name) + # if the format is W3cExtendedFormat, check if the logs are from IIS and if so, issue a warning if the + # --w3c-time-taken-milli option isn't set + if isinstance(format, W3cExtendedFormat): + format.check_for_iis_option() + return format @staticmethod @@ -1583,6 +1651,7 @@ def detect_format(file): pass if not format: + raise RuntimeError('sdfjlsd') fatal_error("cannot automatically determine the log format using the first %d lines of the log file. " % limit + "\nMaybe try specifying the format with the --log-format-name command line argument." ) return @@ -1706,13 +1775,13 @@ def invalid_line(line, reason): hit.length = 0 try: - hit.generation_time_milli = int(format.get('generation_time_milli')) + hit.generation_time_milli = float(format.get('generation_time_milli')) except BaseFormatException: try: - hit.generation_time_milli = int(format.get('generation_time_micro')) / 1000 + hit.generation_time_milli = float(format.get('generation_time_micro')) / 1000 except BaseFormatException: try: - hit.generation_time_milli = int(format.get('generation_time_secs')) * 1000 + hit.generation_time_milli = float(format.get('generation_time_secs')) * 1000 except BaseFormatException: hit.generation_time_milli = 0 @@ -1735,6 +1804,19 @@ def invalid_line(line, reason): except: pass + # add event info + try: + hit.event_category = hit.event_action = hit.event_name = None + + hit.event_category = format.get('event_category') + hit.event_action = format.get('event_action') + + hit.event_name = format.get('event_name') + if hit.event_name == '-': + hit.event_name = None + except: + pass + # Check if the hit must be excluded. if not all((method(hit) for method in self.check_methods)): continue diff --git a/misc/log-analytics/tests/logs/amazon_cloudfront_rtmp.log b/misc/log-analytics/tests/logs/amazon_cloudfront_rtmp.log new file mode 100644 index 00000000000..7b226473d07 --- /dev/null +++ b/misc/log-analytics/tests/logs/amazon_cloudfront_rtmp.log @@ -0,0 +1,4 @@ +#Version: 1.0 +#Fields: date time x-edge-location c-ip x-event sc-bytes x-cf-status x-cf-client-id cs-uri-stem cs-uri-query c-referrer x-page-url​ c-user-agent x-sname x-sname-query x-file-ext x-sid +2010-03-12 23:51:20 SEA4 192.0.2.147 connect 2014 OK bfd8a98bee0840d9b871b7f6ade9908f rtmp://shqshne4jdp4b6.cloudfront.net/cfx/st​ key=value http://player.longtailvideo.com/player.swf http://www.longtailvideo.com/support/jw-player-setup-wizard?example=204 LNX%2010,0,32,18 - - - - +2010-03-12 23:51:21 SEA4 192.0.2.222 play 3914 OK bfd8a98bee0840d9b871b7f6ade9908f rtmp://shqshne4jdp4b6.cloudfront.net/cfx/st​ key=value http://player.longtailvideo.com/player.swf http://www.longtailvideo.com/support/jw-player-setup-wizard?example=204 LNX%2010,0,32,18 myvideo p=2&q=4 flv 1 diff --git a/misc/log-analytics/tests/logs/amazon_cloudfront_web.log b/misc/log-analytics/tests/logs/amazon_cloudfront_web.log new file mode 100644 index 00000000000..30db4a152af --- /dev/null +++ b/misc/log-analytics/tests/logs/amazon_cloudfront_web.log @@ -0,0 +1,3 @@ +#Version: 1.0 +#Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time-taken +2014-05-23 01:13:11 FRA2 182 192.0.2.10 GET d111111abcdef8.cloudfront.net /view/my/file.html 200 www.displaymyfiles.com Mozilla/4.0%20(compatible;%20MSIE%205.0b1;%20Mac_PowerPC) - zip=98101 RefreshHit MRVMF7KydIvxMWfJIglgwHQwZsbG2IhRJ07sn9AkKUFSHS9EXAMPLE== d111111abcdef8.cloudfront.net http - 0.001 diff --git a/misc/log-analytics/tests/tests.py b/misc/log-analytics/tests/tests.py index 73811a37176..39e4bc7dbb1 100644 --- a/misc/log-analytics/tests/tests.py +++ b/misc/log-analytics/tests/tests.py @@ -22,30 +22,31 @@ def tearDownModule(): os.remove('tmp.log') def test_format_detection(): - def _test(format_name): - file = open('logs/%s.log' % format_name) + def _test(format_name, log_file = None): + if log_file is None: + log_file = 'logs/%s.log' % format_name + + file = open(log_file) import_logs.config = Config() format = import_logs.Parser.detect_format(file) assert(format is not None) - if format_name == 'iis': - assert(format.name == 'w3c_extended') - else: - assert(format.name == format_name) + assert(format.name == format_name) - def _test_junk(format_name): - tmp_path = add_junk_to_file('logs/%s.log' % format_name) + def _test_junk(format_name, log_file = None): + if log_file is None: + log_file = 'logs/%s.log' % format_name + + tmp_path = add_junk_to_file(log_file) file = open(tmp_path) import_logs.config = Config() format = import_logs.Parser.detect_format(file) assert(format is not None) - if format_name == 'iis': - assert(format.name == 'w3c_extended') - else: - assert(format.name == format_name) + assert(format.name == format_name) for format_name in import_logs.FORMATS.iterkeys(): - if format_name == 'w3c_extended': # tested by iis and netscaler log files + # w3c extended tested by iis and netscaler log files; amazon cloudfront tested later + if format_name == 'w3c_extended' or format_name == 'amazon_cloudfront': continue f = functools.partial(_test, format_name) @@ -56,6 +57,23 @@ def _test_junk(format_name): f.description = 'Testing autodetection of format ' + format_name + ' w/ garbage at end of line' yield f + # add tests for amazon cloudfront (normal web + rtmp) + f = functools.partial(_test, 'w3c_extended', 'logs/amazon_cloudfront_web.log') + f.description = 'Testing autodetection of amazon cloudfront (web) logs.' + yield f + + f = functools.partial(_test_junk, 'w3c_extended', 'logs/amazon_cloudfront_web.log') + f.description = 'Testing autodetection of amazon cloudfront (web) logs w/ garbage at end of line' + yield f + + f = functools.partial(_test, 'amazon_cloudfront', 'logs/amazon_cloudfront_rtmp.log') + f.description = 'Testing autodetection of amazon cloudfront (rtmp) logs.' + yield f + + f = functools.partial(_test_junk, 'amazon_cloudfront', 'logs/amazon_cloudfront_rtmp.log') + f.description = 'Testing autodetection of amazon cloudfront (rtmp) logs w/ garbage at end of line.' + yield f + class Options(object): """Mock config options necessary to run checkers from Parser class.""" debug = False @@ -77,7 +95,7 @@ class Options(object): enable_http_errors = False download_extensions = 'doc,pdf' custom_w3c_fields = {} - w3c_time_taken_in_secs = False + w3c_time_taken_in_millisecs = False class Config(object): """Mock configuration.""" @@ -242,7 +260,8 @@ def check_iis_groups(groups): assert groups['host'] == 'example.com' expected_hit_properties = ['date', 'path', 'query_string', 'ip', 'referrer', 'user_agent', - 'status', 'length', 'host', 'userid', 'generation_time_milli'] + 'status', 'length', 'host', 'userid', 'generation_time_milli', + '__win32_status'] for property_name in groups.keys(): assert property_name in expected_hit_properties @@ -289,7 +308,8 @@ def _test_with_junk(format_name, path): _test(format_name, tmp_path) for format_name in import_logs.FORMATS.iterkeys(): - if format_name == 'w3c_extended': # tested by IIS and netscaler logs + # w3c extended tested by IIS and netscaler logs; amazon cloudfront tested individually + if format_name == 'w3c_extended' or format_name == 'amazon_cloudfront': continue f = functools.partial(_test, format_name, 'logs/' + format_name + '.log') @@ -304,7 +324,6 @@ def _test_with_junk(format_name, path): f.description = 'Testing parsing of format "common" with ncsa_extended log' yield f - def test_iis_custom_format(): """test IIS custom format name parsing.""" @@ -323,6 +342,7 @@ def test_iis_custom_format(): import_logs.config.options.enable_http_redirects = True import_logs.config.options.enable_http_errors = True import_logs.config.options.replay_tracking = False + # import_logs.config.options.w3c_time_taken_in_millisecs = True test that even w/o this, we get the right values import_logs.parser.parse(file_) hits = [hit.__dict__ for hit in Recorder.recorders] @@ -397,7 +417,7 @@ def test_netscaler_parsing(): import_logs.config.options.enable_http_redirects = True import_logs.config.options.enable_http_errors = True import_logs.config.options.replay_tracking = False - import_logs.config.options.w3c_time_taken_in_secs = True + import_logs.config.options.w3c_time_taken_in_millisecs = False import_logs.parser.parse(file_) hits = [hit.__dict__ for hit in Recorder.recorders] @@ -420,4 +440,115 @@ def test_netscaler_parsing(): assert hits[0]['path'] == u'/Citrix/XenApp/Wan/auth/login.jsp' assert hits[0]['is_robot'] == False assert hits[0]['full_path'] == u'/Citrix/XenApp/Wan/auth/login.jsp' - assert hits[0]['user_agent'] == u'Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022)' \ No newline at end of file + assert hits[0]['user_agent'] == u'Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022)' + +def test_amazon_cloudfront_web_parsing(): + """test parsing of amazon cloudfront logs (which use extended W3C log format)""" + + file_ = 'logs/amazon_cloudfront_web.log' + + # have to override previous globals override for this test + import_logs.config.options.custom_w3c_fields = {} + Recorder.recorders = [] + import_logs.parser = import_logs.Parser() + import_logs.config.format = None + import_logs.config.options.enable_http_redirects = True + import_logs.config.options.enable_http_errors = True + import_logs.config.options.replay_tracking = False + import_logs.config.options.w3c_time_taken_in_millisecs = False + import_logs.parser.parse(file_) + + hits = [hit.__dict__ for hit in Recorder.recorders] + + import_logs.logging.debug(hits) + + assert hits[0]['status'] == u'200' + assert hits[0]['userid'] == None + assert hits[0]['is_error'] == False + assert hits[0]['extension'] == u'html' + assert hits[0]['is_download'] == False + assert hits[0]['referrer'] == u'www.displaymyfiles.com' + assert hits[0]['args'] == {} + assert hits[0]['generation_time_milli'] == 1.0 + assert hits[0]['host'] == 'foo' + assert hits[0]['filename'] == 'logs/amazon_cloudfront_web.log' + assert hits[0]['is_redirect'] == False + assert hits[0]['date'] == datetime.datetime(2014, 5, 23, 1, 13, 11) + assert hits[0]['lineno'] == 2 + assert hits[0]['ip'] == u'192.0.2.10' + assert hits[0]['query_string'] == '' + assert hits[0]['path'] == u'/view/my/file.html' + assert hits[0]['is_robot'] == False + assert hits[0]['full_path'] == u'/view/my/file.html' + assert hits[0]['user_agent'] == u'Mozilla/4.0%20(compatible;%20MSIE%205.0b1;%20Mac_PowerPC)' + + assert len(hits) == 1 + +def test_amazon_cloudfront_rtmp_parsing(): + """test parsing of amazon cloudfront rtmp logs (which use extended W3C log format w/ custom fields for event info)""" + + file_ = 'logs/amazon_cloudfront_rtmp.log' + + # have to override previous globals override for this test + import_logs.config.options.custom_w3c_fields = {} + Recorder.recorders = [] + import_logs.parser = import_logs.Parser() + import_logs.config.format = None + import_logs.config.options.enable_http_redirects = True + import_logs.config.options.enable_http_errors = True + import_logs.config.options.replay_tracking = False + import_logs.config.options.w3c_time_taken_in_millisecs = False + import_logs.parser.parse(file_) + + hits = [hit.__dict__ for hit in Recorder.recorders] + + import_logs.logging.debug(hits) + + assert hits[0]['is_download'] == False + assert hits[0]['ip'] == u'192.0.2.147' + assert hits[0]['is_redirect'] == False + assert hits[0]['filename'] == 'logs/amazon_cloudfront_rtmp.log' + assert hits[0]['event_category'] == 'cloudfront_rtmp' + assert hits[0]['event_action'] == u'connect' + assert hits[0]['lineno'] == 2 + assert hits[0]['status'] == '200' + assert hits[0]['is_error'] == False + assert hits[0]['event_name'] == u'-' + assert hits[0]['args'] == {} + assert hits[0]['host'] == 'foo' + assert hits[0]['date'] == datetime.datetime(2010, 3, 12, 23, 51, 20) + assert hits[0]['path'] == u'/shqshne4jdp4b6.cloudfront.net/cfx/st\u200b' + assert hits[0]['extension'] == u'net/cfx/st\u200b' + assert hits[0]['referrer'] == '' + assert hits[0]['userid'] == None + assert hits[0]['user_agent'] == u'LNX%2010,0,32,18' + assert hits[0]['generation_time_milli'] == 0 + assert hits[0]['query_string'] == u'key=value' + assert hits[0]['is_robot'] == False + assert hits[0]['full_path'] == u'/shqshne4jdp4b6.cloudfront.net/cfx/st\u200b' + + assert hits[1]['is_download'] == False + assert hits[1]['ip'] == u'192.0.2.222' + assert hits[1]['is_redirect'] == False + assert hits[1]['filename'] == 'logs/amazon_cloudfront_rtmp.log' + assert hits[1]['event_category'] == 'cloudfront_rtmp' + assert hits[1]['event_action'] == u'play' + assert hits[1]['lineno'] == 3 + assert hits[1]['status'] == '200' + assert hits[1]['is_error'] == False + assert hits[1]['event_name'] == u'myvideo' + assert hits[1]['args'] == {} + assert hits[1]['host'] == 'foo' + assert hits[1]['date'] == datetime.datetime(2010, 3, 12, 23, 51, 21) + assert hits[1]['path'] == u'/shqshne4jdp4b6.cloudfront.net/cfx/st\u200b' + assert hits[1]['extension'] == u'net/cfx/st\u200b' + assert hits[1]['referrer'] == '' + assert hits[1]['userid'] == None + assert hits[1]['length'] == 3914 + assert hits[1]['user_agent'] == u'LNX%2010,0,32,18' + assert hits[1]['generation_time_milli'] == 0 + assert hits[1]['query_string'] == u'key=value' + assert hits[1]['is_robot'] == False + assert hits[1]['full_path'] == u'/shqshne4jdp4b6.cloudfront.net/cfx/st\u200b' + + assert len(hits) == 2 diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php index 830d22778cd..0603ae4d4b9 100644 --- a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php +++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php @@ -29,6 +29,8 @@ class ManySitesImportedLogs extends Fixture public $addSegments = false; public $includeIisWithCustom = false; public $includeNetscaler = false; + public $includeCloudfront = false; + public $includeCloudfrontRtmp = false; public static function createAccessInstance() { @@ -121,6 +123,14 @@ private function trackVisits() if ($this->includeNetscaler) { $this->logNetscaler(); } + + if ($this->includeCloudfront) { + $this->logCloudfront(); + } + + if ($this->includeCloudfrontRtmp) { + $this->logCloudfrontRtmp(); + } } private function setupSegments() @@ -262,9 +272,26 @@ private function logNetscaler() '--w3c-map-field' => array(), '--enable-http-redirects' => false); - $output = self::executeLogImporter($logFile, $opts); + return self::executeLogImporter($logFile, $opts); + } + + private function logCloudfront() + { + $logFile = PIWIK_INCLUDE_PATH . '/tests/resources/access-logs/fake_logs_cloudfront.log'; + + $opts = array('--idsite' => $this->idSite, + '--token-auth' => self::getTokenAuth()); + + return self::executeLogImporter($logFile, $opts); + } + + private function logCloudfrontRtmp() + { + $logFile = PIWIK_INCLUDE_PATH . '/tests/resources/access-logs/fake_logs_cloudfront_rtmp.log'; + + $opts = array('--idsite' => $this->idSite, + '--token-auth' => self::getTokenAuth()); - // make sure warning about --w3c-time-taken-secs appears in importer output - self::assertContains("WARNING: netscaler log file being parsed without --w3c-time-taken-secs option.", implode("\n", $output)); + return self::executeLogImporter($logFile, $opts); } } \ No newline at end of file diff --git a/tests/PHPUnit/System/ImportLogsTest.php b/tests/PHPUnit/System/ImportLogsTest.php index b13317b68fc..5de667fb5cb 100755 --- a/tests/PHPUnit/System/ImportLogsTest.php +++ b/tests/PHPUnit/System/ImportLogsTest.php @@ -20,6 +20,7 @@ */ class ImportLogsTest extends SystemTestCase { + /** @var ManySitesImportedLogs */ public static $fixture = null; // initialized below class definition /** @@ -104,4 +105,6 @@ public static function getOutputPrefix() ImportLogsTest::$fixture = new ManySitesImportedLogs(); ImportLogsTest::$fixture->includeIisWithCustom = true; -ImportLogsTest::$fixture->includeNetscaler = true; \ No newline at end of file +ImportLogsTest::$fixture->includeNetscaler = true; +ImportLogsTest::$fixture->includeCloudfront = true; +ImportLogsTest::$fixture->includeCloudfrontRtmp = true; \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml index 6ae99318f04..1e6f6a255d0 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml @@ -1129,4 +1129,66 @@ + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + 0.001 + http://piwik.net/view/my/file.html + + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_range.xml index cce26eeec72..0b50d71afa2 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getEntryPageUrls_range.xml @@ -1470,4 +1470,66 @@ + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + 0.001 + http://piwik.net/view/my/file.html + + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml index f3ebc92964d..456545a4049 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml @@ -1113,4 +1113,66 @@ + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + 0.001 + http://piwik.net/view/my/file.html + + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_range.xml index 63c3d594e06..0333b89144a 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getExitPageUrls_range.xml @@ -1448,6 +1448,68 @@ + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + 0.001 + http://piwik.net/view/my/file.html + + + + + 1 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_month.xml index 7ecefada555..0fe5e0f680a 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_month.xml @@ -2,17 +2,17 @@ - 23 - 23 + 24 + 24 0 - 2 - 0.109 + 3 + 0.001 0.359 - 23 + 24 0 0% 0% - 0.234 + 0.156 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_range.xml index 690c2e28a00..1a9344607de 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageTitles_range.xml @@ -2,17 +2,17 @@ - 24 - 33 + 25 + 34 0 - 12 - 0.023 + 13 + 0.001 1.324 - 24 + 25 0 0% 0% - 0.361 + 0.333 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_month.xml index c7ae80a4540..cbdc5cc10c3 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_month.xml @@ -1188,4 +1188,66 @@ + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + 0.001 + http://piwik.net/view/my/file.html + + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_range.xml index 3434158d1fd..086a61b4f5b 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.getPageUrls_range.xml @@ -1577,6 +1577,68 @@ + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 0 + 100% + 100% + 0.001 + + + + 1 + 1 + 0 + 1 + 0.001 + 0.001 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + 0.001 + http://piwik.net/view/my/file.html + + + + + 1 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_month.xml index 18b7f289f64..2bfcebff1f4 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_month.xml @@ -1,12 +1,12 @@ - 32 - 32 + 33 + 33 4 4 0 0 0 0 - 0.277 + 0.208 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_range.xml index 0fc359540dc..a555907e639 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Actions.get_range.xml @@ -1,12 +1,12 @@ - 56 - 50 + 57 + 51 5 5 1 1 0 0 - 0.298 + 0.285 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml index 491523012e9..4214925c47c 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml @@ -2,13 +2,13 @@ - 35 + 38 - 26 - 28 - 26 + 29 + 31 + 29 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml index 34fadbbd572..6fd6bdf02bf 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml @@ -2,13 +2,13 @@ - 28 - 32 + 31 + 35 3 548 - 25 - 26 - 27 + 28 + 27 + 30 1 plugins/DevicesDetection/images/brand/Unknown.ico diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserEngines_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserEngines_month.xml index 147f52ac7c9..f57f78606cd 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserEngines_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserEngines_month.xml @@ -22,6 +22,17 @@ 7 0 + + + 5 + 5 + 1 + 0 + 5 + 2 + 5 + 0 + 3 @@ -33,17 +44,6 @@ 2 2 - - - 2 - 2 - 1 - 0 - 2 - 1 - 2 - 0 - 2 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml index 82fd2a7603c..d0c894d25c2 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserFamilies_month.xml @@ -49,19 +49,19 @@ plugins/DevicesDetection/images/browsers/CH.gif - - 2 - 2 + + 5 + 5 1 0 - 2 + 5 2 - 2 + 5 0 - plugins/DevicesDetection/images/browsers/AN.gif + plugins/DevicesDetection/images/browsers/UNK.gif - + 2 2 1 @@ -70,19 +70,19 @@ 2 2 0 - plugins/DevicesDetection/images/browsers/FF.gif + plugins/DevicesDetection/images/browsers/AN.gif - + 2 2 1 0 2 - 1 + 2 2 0 - plugins/DevicesDetection/images/browsers/UNK.gif + plugins/DevicesDetection/images/browsers/FF.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserVersions_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserVersions_month.xml index 90f330a5e57..bcc37fcec6a 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserVersions_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowserVersions_month.xml @@ -36,6 +36,18 @@ 0 plugins/DevicesDetection/images/browsers/CH.gif + + + 5 + 5 + 1 + 0 + 5 + 2 + 5 + 0 + plugins/DevicesDetection/images/browsers/UNK.gif + 2 @@ -96,18 +108,6 @@ 0 plugins/DevicesDetection/images/browsers/FF.gif - - - 2 - 2 - 1 - 0 - 2 - 1 - 2 - 0 - plugins/DevicesDetection/images/browsers/UNK.gif - 1 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowsers_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowsers_month.xml index 82fd2a7603c..d0c894d25c2 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowsers_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrowsers_month.xml @@ -49,19 +49,19 @@ plugins/DevicesDetection/images/browsers/CH.gif - - 2 - 2 + + 5 + 5 1 0 - 2 + 5 2 - 2 + 5 0 - plugins/DevicesDetection/images/browsers/AN.gif + plugins/DevicesDetection/images/browsers/UNK.gif - + 2 2 1 @@ -70,19 +70,19 @@ 2 2 0 - plugins/DevicesDetection/images/browsers/FF.gif + plugins/DevicesDetection/images/browsers/AN.gif - + 2 2 1 0 2 - 1 + 2 2 0 - plugins/DevicesDetection/images/browsers/UNK.gif + plugins/DevicesDetection/images/browsers/FF.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getModel_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getModel_month.xml index d0be913ad26..199e2ae68f2 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getModel_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getModel_month.xml @@ -2,13 +2,13 @@ - 28 - 32 + 31 + 35 3 548 - 25 - 26 - 27 + 28 + 27 + 30 1 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsFamilies_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsFamilies_month.xml index cfa85794747..6837e44818e 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsFamilies_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsFamilies_month.xml @@ -1,5 +1,17 @@ + + + 9 + 12 + 3 + 306 + 7 + 8 + 8 + 1 + plugins/DevicesDetection/images/os/MAC.gif + 8 @@ -12,18 +24,6 @@ 0 plugins/DevicesDetection/images/os/LIN.gif - - - 8 - 11 - 3 - 306 - 6 - 7 - 7 - 1 - plugins/DevicesDetection/images/os/MAC.gif - 10 @@ -49,25 +49,25 @@ plugins/DevicesDetection/images/os/AND.gif - - 1 - 1 + + 3 + 3 1 0 - 1 - 1 - 1 + 3 + 0 + 3 0 plugins/DevicesDetection/images/os/UNK.gif - + 1 1 1 0 1 - 0 + 1 1 0 plugins/DevicesDetection/images/os/UNK.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsVersions_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsVersions_month.xml index 636ccfdeb77..06b7964798d 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsVersions_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getOsVersions_month.xml @@ -36,6 +36,18 @@ 0 plugins/DevicesDetection/images/os/MAC.gif + + + 3 + 3 + 1 + 0 + 3 + 0 + 3 + 0 + plugins/DevicesDetection/images/os/UNK.gif + 2 @@ -97,7 +109,7 @@ plugins/DevicesDetection/images/os/UNK.gif - + 1 1 1 @@ -109,16 +121,16 @@ plugins/DevicesDetection/images/os/MAC.gif - + 1 1 1 0 1 - 0 + 1 1 0 - plugins/DevicesDetection/images/os/UNK.gif + plugins/DevicesDetection/images/os/MAC.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getType_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getType_month.xml index e838256d3f2..9e7d544aec7 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getType_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getType_month.xml @@ -2,16 +2,28 @@ - 26 - 30 + 27 + 31 3 548 - 23 - 25 - 25 + 24 + 26 + 26 1 plugins/DevicesDetection/images/screens/normal.gif + + + 4 + 4 + 1 + 0 + 4 + 1 + 4 + 0 + plugins/DevicesDetection/images/screens/unknown.gif + 3 @@ -24,18 +36,6 @@ 1 plugins/DevicesDetection/images/screens/smartphone.png - - - 2 - 2 - 1 - 0 - 2 - 1 - 2 - 0 - plugins/DevicesDetection/images/screens/unknown.gif - 0 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Events.getAction_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Events.getAction_month.xml index c234bed59e9..3a93f6652bc 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Events.getAction_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Events.getAction_month.xml @@ -1,2 +1,38 @@ - \ No newline at end of file + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Events.getCategory_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Events.getCategory_month.xml index c234bed59e9..23e67434b4f 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Events.getCategory_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Events.getCategory_month.xml @@ -1,2 +1,38 @@ - \ No newline at end of file + + + + 2 + 2 + 0 + 0 + 0 + 0 + 2 + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Events.getName_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Events.getName_month.xml index c234bed59e9..8c2883c098b 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Events.getName_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Events.getName_month.xml @@ -1,2 +1,51 @@ - \ No newline at end of file + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + + \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml index 8c1697b2218..f79d26674bd 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml @@ -2,7 +2,7 @@ - 28 + 29 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml index 970c5a295dc..1f6c128fbc5 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml @@ -2,7 +2,7 @@ - 29 + 30 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Goals.get_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Goals.get_month.xml index 35d78ccc178..93be92ec99e 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Goals.get_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Goals.get_month.xml @@ -1,7 +1,7 @@ - 29 - 29 - 145 - 93.55% + 30 + 30 + 150 + 88.24% \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml index ff63b6a32a3..c96927245a8 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml @@ -1786,6 +1786,109 @@ + + + 1 + 46 + 192.0.2.10 + + + + goal + all + 1 + 5 + 64 + + http://piwik.net/view/my/file.html + plugins/Morpheus/images/goal.png + + + action + http://piwik.net/view/my/file.html + + 64 + + 64 + + + HTTP-code + 200 + + + 0.001s + + + + 1 + USD + $ + + + + + 0 + 1 + + new + + 1 + plugins/Morpheus/images/goal.png + 1 + + none + + 0 + 0 + 0 + 0s + + + Desktop + Mac + MAC + plugins/DevicesDetection/images/os/MAC.gif + + Unknown + Unknown + Unknown + plugins/DevicesDetection/images/browsers/UNK.gif + UNK + + 0 + Unknown + Unknown + + direct + Direct Entry + + + + + + + unknown + Unknown + unk + Unknown + xx + plugins/UserCountry/images/flags/xx.png + + + + Unknown + + + + + 01:13:11 + 1 + 0 + + + + + 1 @@ -2485,6 +2588,193 @@ + + + 1 + 48 + 192.0.2.222 + + + + event + http://piwik.net/shqshne4jdp4b6.cloudfront.net/cfx/st​?key=value + 65 + + 66 + cloudfront_rtmp + play + + + HTTP-code + 200 + + + myvideo + plugins/Morpheus/images/event.png + + + 0 + USD + $ + + + + + 0 + 1 + + new + + 0 + + 1 + + none + + 0 + 0 + 0 + 0s + + + Unknown + Unknown + UNK + plugins/DevicesDetection/images/os/UNK.gif + + Unknown + Unknown + Unknown + plugins/DevicesDetection/images/browsers/UNK.gif + UNK + + 1 + Unknown + Unknown + + direct + Direct Entry + + + + + + + unknown + Unknown + unk + Unknown + xx + plugins/UserCountry/images/flags/xx.png + + + + Unknown + + + + + 23:51:21 + 23 + 0 + + + + + + + + 1 + 47 + 192.0.2.147 + + + + event + http://piwik.net/shqshne4jdp4b6.cloudfront.net/cfx/st​?key=value + 65 + + 65 + cloudfront_rtmp + connect + + + HTTP-code + 200 + + + plugins/Morpheus/images/event.png + + + 0 + USD + $ + + + + + 0 + 1 + + new + + 0 + + 1 + + none + + 0 + 0 + 0 + 0s + + + Unknown + Unknown + UNK + plugins/DevicesDetection/images/os/UNK.gif + + Unknown + Unknown + Unknown + plugins/DevicesDetection/images/browsers/UNK.gif + UNK + + 1 + Unknown + Unknown + + direct + Direct Entry + + + + + + + unknown + Unknown + unk + Unknown + xx + plugins/UserCountry/images/flags/xx.png + + + + Unknown + + + + + 23:51:20 + 23 + 0 + + + + + 1 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getAll_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getAll_month.xml index d2edd33b602..275d1499ced 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getAll_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getAll_month.xml @@ -2,10 +2,10 @@ - 31 - 36 - 32 - 145 + 34 + 39 + 33 + 150 100% 100% 100% diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getOne_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getOne_month.xml index 79b56ff9799..fb7252904eb 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getOne_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__MultiSites.getOne_month.xml @@ -1,11 +1,11 @@ - 31 - 36 + 34 + 39 100% 100% 100% 100% - 32 - 145 + 33 + 150 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Provider.getProvider_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Provider.getProvider_month.xml index f83cd0a71c0..76382aadab0 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Provider.getProvider_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Provider.getProvider_month.xml @@ -2,13 +2,13 @@ - 31 - 36 + 34 + 39 3 550 - 27 - 29 - 30 + 30 + 30 + 33 2 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Referrers.getReferrerType_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Referrers.getReferrerType_month.xml index 9b5ba79691a..e5e8c8d924e 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Referrers.getReferrerType_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Referrers.getReferrerType_month.xml @@ -2,22 +2,23 @@ - 29 - 34 + 32 + 37 3 550 - 25 + 28 - 27 - 27 - 135 + 28 + 28 + 140 - 27 - 135 - 28 + 28 + 140 + 31 2 + 0 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getConfiguration_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getConfiguration_month.xml index 75d278b51bb..de82b8409f6 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getConfiguration_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getConfiguration_month.xml @@ -44,6 +44,17 @@ 2 1 + + + 3 + 3 + 1 + 0 + 3 + 0 + 3 + 0 + 2 @@ -111,13 +122,13 @@ 0 - + 1 1 1 0 1 - 0 + 1 1 0 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getResolution_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getResolution_month.xml index 378996fabca..a8dc2aedb45 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getResolution_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__Resolution.getResolution_month.xml @@ -2,13 +2,13 @@ - 29 - 34 + 32 + 37 3 550 - 25 - 27 - 28 + 28 + 28 + 31 2 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCity_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCity_month.xml index dc702824f12..eca5acdf703 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCity_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCity_month.xml @@ -2,22 +2,23 @@ - 26 - 31 + 29 + 34 3 550 - 22 + 25 - 24 - 24 - 120 + 25 + 25 + 125 - 24 - 120 - 25 + 25 + 125 + 28 2 + 0 Unknown xx xx diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getContinent_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getContinent_month.xml index 212e81c7859..eeb3aa43cf7 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getContinent_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getContinent_month.xml @@ -21,31 +21,32 @@ Asia - - 8 - 9 + + 11 + 12 2 - 3 - 7 + 242 + 10 - 8 - 8 - 40 + 9 + 9 + 45 - 8 - 40 - 7 - 2 - North America + 9 + 45 + 11 + 0 + 0 + Unknown - + 8 9 2 - 242 + 3 7 @@ -56,9 +57,9 @@ 8 40 - 8 - 0 - Unknown + 7 + 2 + North America diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCountry_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCountry_month.xml index 1c82333bf07..b88e3fec304 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCountry_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getCountry_month.xml @@ -24,34 +24,35 @@ 11 - - 8 - 9 + + 11 + 12 2 - 3 - 7 + 242 + 10 - 8 - 8 - 40 + 9 + 9 + 45 - 8 - 40 - 7 - 2 - us - plugins/UserCountry/images/flags/us.png + 9 + 45 + 11 + 0 + 0 + xx + plugins/UserCountry/images/flags/xx.png 16 11 - + 8 9 2 - 242 + 3 7 @@ -62,10 +63,10 @@ 8 40 - 8 - 0 - xx - plugins/UserCountry/images/flags/xx.png + 7 + 2 + us + plugins/UserCountry/images/flags/us.png 16 11 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getRegion_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getRegion_month.xml index 1149b705a7c..e758c3e8aa2 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getRegion_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserCountry.getRegion_month.xml @@ -2,22 +2,23 @@ - 26 - 31 + 29 + 34 3 550 - 22 + 25 - 24 - 24 - 120 + 25 + 25 + 125 - 24 - 120 - 25 + 25 + 125 + 28 2 + 0 xx xx Unknown diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml index 147f52ac7c9..f57f78606cd 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml @@ -22,6 +22,17 @@ 7 0 + + + 5 + 5 + 1 + 0 + 5 + 2 + 5 + 0 + 3 @@ -33,17 +44,6 @@ 2 2 - - - 2 - 2 - 1 - 0 - 2 - 1 - 2 - 0 - 2 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml index 90f330a5e57..bcc37fcec6a 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml @@ -36,6 +36,18 @@ 0 plugins/DevicesDetection/images/browsers/CH.gif + + + 5 + 5 + 1 + 0 + 5 + 2 + 5 + 0 + plugins/DevicesDetection/images/browsers/UNK.gif + 2 @@ -96,18 +108,6 @@ 0 plugins/DevicesDetection/images/browsers/FF.gif - - - 2 - 2 - 1 - 0 - 2 - 1 - 2 - 0 - plugins/DevicesDetection/images/browsers/UNK.gif - 1 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowser_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowser_month.xml index 82fd2a7603c..d0c894d25c2 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowser_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getBrowser_month.xml @@ -49,19 +49,19 @@ plugins/DevicesDetection/images/browsers/CH.gif - - 2 - 2 + + 5 + 5 1 0 - 2 + 5 2 - 2 + 5 0 - plugins/DevicesDetection/images/browsers/AN.gif + plugins/DevicesDetection/images/browsers/UNK.gif - + 2 2 1 @@ -70,19 +70,19 @@ 2 2 0 - plugins/DevicesDetection/images/browsers/FF.gif + plugins/DevicesDetection/images/browsers/AN.gif - + 2 2 1 0 2 - 1 + 2 2 0 - plugins/DevicesDetection/images/browsers/UNK.gif + plugins/DevicesDetection/images/browsers/FF.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml index 75d278b51bb..de82b8409f6 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml @@ -44,6 +44,17 @@ 2 1 + + + 3 + 3 + 1 + 0 + 3 + 0 + 3 + 0 + 2 @@ -111,13 +122,13 @@ 0 - + 1 1 1 0 1 - 0 + 1 1 0 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguageCode_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguageCode_month.xml index 8d4b8d074e8..3acd2a06f0f 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguageCode_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguageCode_month.xml @@ -2,13 +2,13 @@ - 31 - 36 + 34 + 39 3 550 - 27 - 29 - 30 + 30 + 30 + 33 2 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguage_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguage_month.xml index 3ed6ff73098..6405f7bd2d9 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguage_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getLanguage_month.xml @@ -2,13 +2,13 @@ - 31 - 36 + 34 + 39 3 550 - 27 - 29 - 30 + 30 + 30 + 33 2 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml index e838256d3f2..9e7d544aec7 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml @@ -2,16 +2,28 @@ - 26 - 30 + 27 + 31 3 548 - 23 - 25 - 25 + 24 + 26 + 26 1 plugins/DevicesDetection/images/screens/normal.gif + + + 4 + 4 + 1 + 0 + 4 + 1 + 4 + 0 + plugins/DevicesDetection/images/screens/unknown.gif + 3 @@ -24,18 +36,6 @@ 1 plugins/DevicesDetection/images/screens/smartphone.png - - - 2 - 2 - 1 - 0 - 2 - 1 - 2 - 0 - plugins/DevicesDetection/images/screens/unknown.gif - 0 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml index cfa85794747..6837e44818e 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml @@ -1,5 +1,17 @@ + + + 9 + 12 + 3 + 306 + 7 + 8 + 8 + 1 + plugins/DevicesDetection/images/os/MAC.gif + 8 @@ -12,18 +24,6 @@ 0 plugins/DevicesDetection/images/os/LIN.gif - - - 8 - 11 - 3 - 306 - 6 - 7 - 7 - 1 - plugins/DevicesDetection/images/os/MAC.gif - 10 @@ -49,25 +49,25 @@ plugins/DevicesDetection/images/os/AND.gif - - 1 - 1 + + 3 + 3 1 0 - 1 - 1 - 1 + 3 + 0 + 3 0 plugins/DevicesDetection/images/os/UNK.gif - + 1 1 1 0 1 - 0 + 1 1 0 plugins/DevicesDetection/images/os/UNK.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOS_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOS_month.xml index 636ccfdeb77..06b7964798d 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOS_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getOS_month.xml @@ -36,6 +36,18 @@ 0 plugins/DevicesDetection/images/os/MAC.gif + + + 3 + 3 + 1 + 0 + 3 + 0 + 3 + 0 + plugins/DevicesDetection/images/os/UNK.gif + 2 @@ -97,7 +109,7 @@ plugins/DevicesDetection/images/os/UNK.gif - + 1 1 1 @@ -109,16 +121,16 @@ plugins/DevicesDetection/images/os/MAC.gif - + 1 1 1 0 1 - 0 + 1 1 0 - plugins/DevicesDetection/images/os/UNK.gif + plugins/DevicesDetection/images/os/MAC.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getPlugin_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getPlugin_month.xml index a96d5feb81e..94bb890a250 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getPlugin_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getPlugin_month.xml @@ -3,19 +3,19 @@ 2 - 8% + 7% plugins/UserSettings/images/plugins/cookie.gif 2 - 8% + 7% plugins/UserSettings/images/plugins/flash.gif 2 - 8% + 7% plugins/UserSettings/images/plugins/java.gif diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getResolution_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getResolution_month.xml index 378996fabca..a8dc2aedb45 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getResolution_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__UserSettings.getResolution_month.xml @@ -2,13 +2,13 @@ - 29 - 34 + 32 + 37 3 550 - 25 - 27 - 28 + 28 + 28 + 31 2 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml index 4de7a18047e..ff49f519f07 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml @@ -23,13 +23,13 @@ - 10 - 10 - 11 + 11 + 11 + 12 0 242 - 9 - 10 + 10 + 11 4 @@ -56,7 +56,13 @@ - 0 + 2 + 2 + 2 + 0 + 0 + 2 + 0 7 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml index dc841363a5d..c46f15ceecd 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml @@ -13,13 +13,13 @@ - 0 - 0 - 0 + 1 + 1 + 1 0 - 0 - 0 - 0 + 1 + 1 + 1 0 @@ -255,13 +255,13 @@ - 0 - 0 - 0 + 2 + 2 + 1 0 - 0 + 2 0 - 0 + 2 0 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml index 144d6c42217..78e6f4a1984 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml @@ -13,14 +13,23 @@ - 0 - 0 - 0 + 1 + 1 + 1 0 - 0 + 1 0 - 0 + 1 0 + + + 1 + 1 + 5 + + + 1 + 5 @@ -363,13 +372,13 @@ - 0 - 0 - 0 + 2 + 2 + 1 0 - 0 + 2 0 - 0 + 2 0 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml index 005a1842ab8..08e1ba14747 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml @@ -2,7 +2,7 @@ - 29 + 32 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_range.xml index a66c195749e..6ed9ca578ed 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_range.xml @@ -2,7 +2,7 @@ - 33 + 36 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml index dcd45b3a61f..e841131a550 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml @@ -2,7 +2,7 @@ - 31 + 34 100% diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_range.xml index 768a0961d2e..debbd57d3ca 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_range.xml @@ -2,13 +2,13 @@ - 37 - 84% + 40 + 85% 2 - 5% + 4% @@ -23,7 +23,7 @@ 2 - 5% + 4% diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml index c00b8e2c507..a564cebf19c 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml @@ -2,7 +2,7 @@ - 27 + 30 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_range.xml index 95adfb7f9a3..1680ea4eddc 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_range.xml @@ -2,7 +2,7 @@ - 36 + 39 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml index 1f6410e0795..c6fee8cb763 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml @@ -2,7 +2,7 @@ - 28 + 31 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_range.xml index c53cacde6f0..06c54655553 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_range.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_range.xml @@ -2,7 +2,7 @@ - 38 + 41 diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getActions_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getActions_month.xml index 8af80c337fc..f24432d1a4c 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getActions_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getActions_month.xml @@ -1,2 +1,2 @@ -36 \ No newline at end of file +39 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml index 40bd2e592a5..3fb94696674 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml @@ -1,2 +1,2 @@ -27 \ No newline at end of file +30 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml index 3fb94696674..95aa700980f 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml @@ -1,2 +1,2 @@ -30 \ No newline at end of file +33 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml index 46af1425a39..3fb94696674 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml @@ -1,2 +1,2 @@ -29 \ No newline at end of file +30 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml index 51c650b8b2b..5c61a821373 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml @@ -1,2 +1,2 @@ -31 \ No newline at end of file +34 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.get_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.get_month.xml index 1772684d5e1..dafccfd4dde 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.get_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__VisitsSummary.get_month.xml @@ -1,14 +1,14 @@ - 30 + 33 2 - 31 - 36 - 29 - 27 + 34 + 39 + 30 + 30 550 3 - 87% - 1.2 - 18 + 88% + 1.1 + 16 \ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ImportLogs_withEnhancedAndLast7__MultiSites.getAll_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs_withEnhancedAndLast7__MultiSites.getAll_month.xml index bce2027e1c7..96ce816d2eb 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs_withEnhancedAndLast7__MultiSites.getAll_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs_withEnhancedAndLast7__MultiSites.getAll_month.xml @@ -3,11 +3,11 @@ - 31 - 36 - 32 - 145 - 29 + 34 + 39 + 33 + 150 + 30 100% 100% 100% @@ -42,11 +42,11 @@ 10 5 1 - -96.8% - -72.2% - -68.8% - -96.6% - -96.6% + -97.1% + -74.4% + -69.7% + -96.7% + -96.7% http://piwik.net 1 diff --git a/tests/resources/access-logs/fake_logs_cloudfront.log b/tests/resources/access-logs/fake_logs_cloudfront.log new file mode 100644 index 00000000000..9892dc36af6 --- /dev/null +++ b/tests/resources/access-logs/fake_logs_cloudfront.log @@ -0,0 +1,3 @@ +#Version: 1.0 +#Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time-taken +2012-08-23 01:13:11 FRA2 182 192.0.2.10 GET d111111abcdef8.cloudfront.net /view/my/file.html 200 www.displaymyfiles.com Mozilla/4.0%20(compatible;%20MSIE%205.0b1;%20Mac_PowerPC) - zip=98101 RefreshHit MRVMF7KydIvxMWfJIglgwHQwZsbG2IhRJ07sn9AkKUFSHS9EXAMPLE== d111111abcdef8.cloudfront.net http - 0.001 diff --git a/tests/resources/access-logs/fake_logs_cloudfront_rtmp.log b/tests/resources/access-logs/fake_logs_cloudfront_rtmp.log new file mode 100644 index 00000000000..117d747b403 --- /dev/null +++ b/tests/resources/access-logs/fake_logs_cloudfront_rtmp.log @@ -0,0 +1,4 @@ +#Version: 1.0 +#Fields: date time x-edge-location c-ip x-event sc-bytes x-cf-status x-cf-client-id cs-uri-stem cs-uri-query c-referrer x-page-url​ c-user-agent x-sname x-sname-query x-file-ext x-sid +2012-08-12 23:51:20 SEA4 192.0.2.147 connect 2014 OK bfd8a98bee0840d9b871b7f6ade9908f rtmp://shqshne4jdp4b6.cloudfront.net/cfx/st​ key=value http://player.longtailvideo.com/player.swf http://www.longtailvideo.com/support/jw-player-setup-wizard?example=204 LNX%2010,0,32,18 - - - - +2012-08-12 23:51:21 SEA4 192.0.2.222 play 3914 OK bfd8a98bee0840d9b871b7f6ade9908f rtmp://shqshne4jdp4b6.cloudfront.net/cfx/st​ key=value http://player.longtailvideo.com/player.swf http://www.longtailvideo.com/support/jw-player-setup-wizard?example=204 LNX%2010,0,32,18 myvideo p=2&q=4 flv 1