Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: sitescripts/stats/test/logprocessor.py

Issue 6312256635666432: Issue 1426 - Don`t ignore redirects during stats processing (Closed)
Patch Set: Created Sept. 22, 2014, 10:50 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sitescripts/stats/common.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus web scripts, 3 # This file is part of the Adblock Plus web scripts,
4 # Copyright (C) 2006-2014 Eyeo GmbH 4 # Copyright (C) 2006-2014 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 "country": "xy", 334 "country": "xy",
335 "time": datetime(2013, 7, 31, 17, 33, 8), 335 "time": datetime(2013, 7, 31, 17, 33, 8),
336 "day": 31, 336 "day": 31,
337 "weekday": 2, 337 "weekday": 2,
338 "hour": 17, 338 "hour": 17,
339 "month": "201307", 339 "month": "201307",
340 "file": "devbuilds/adblockpluschrome/updates.xml", 340 "file": "devbuilds/adblockpluschrome/updates.xml",
341 "query": "os=mac&arch=x86&nacl_arch=x86-32&prod=chromecrx&prodchannel= stable&prodversion=28.0.1500.71&x=id%3Dldcecbkkoecffmfljeihcmifjjdoepkn%26v%3D1. 5.3.977%26uc", 341 "query": "os=mac&arch=x86&nacl_arch=x86-32&prod=chromecrx&prodchannel= stable&prodversion=28.0.1500.71&x=id%3Dldcecbkkoecffmfljeihcmifjjdoepkn%26v%3D1. 5.3.977%26uc",
342 "size": 867, 342 "size": 867,
343 "referrer": "-", 343 "referrer": "-",
344 "status": 200,
344 "ua": "Chrome", 345 "ua": "Chrome",
345 "uaversion": "28.0", 346 "uaversion": "28.0",
346 "fullua": "Chrome 28.0", 347 "fullua": "Chrome 28.0",
347 "clientid": "-", 348 "clientid": "-",
348 "addonName": "adblockpluschrome", 349 "addonName": "adblockpluschrome",
349 "addonVersion": "1.5.3.977", 350 "addonVersion": "1.5.3.977",
350 "fullAddon": "adblockpluschrome 1.5.3.977", 351 "fullAddon": "adblockpluschrome 1.5.3.977",
351 "application": "chrome", 352 "application": "chrome",
352 "applicationVersion": "28.0", 353 "applicationVersion": "28.0",
353 "fullApplication": "chrome 28.0", 354 "fullApplication": "chrome 28.0",
354 } 355 }
355 ), 356 ),
356 ( 357 (
358 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.rdf?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.74&ma xAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} &appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVersion =25.0a1&updateType=97 HTTP/1.1" 404 867 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.adbloc kplus.org" "-"',
359 None
360 ),
361 (
362 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.rdf?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.74&ma xAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} &appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVersion =25.0a1&updateType=97 HTTP/1.1" 301 867 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.adbloc kplus.org" "-"',
363 {
364 "ip": "1.2.3.4",
365 "country": "xy",
366 "time": datetime(2013, 7, 31, 17, 33, 8),
367 "day": 31,
368 "weekday": 2,
369 "hour": 17,
370 "month": "201307",
371 "file": "devbuilds/abpcustomization/update.rdf",
372 "query": "reqVersion=2&id=customization@adblockplus.org&version=1.0.4a .74&maxAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e 97384}&appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppV ersion=25.0a1&updateType=97",
373 "size": 867,
374 "referrer": "-",
375 "status": 301,
376 "ua": "Firefox",
377 "uaversion": "25.0",
378 "fullua": "Firefox 25.0",
379 "clientid": "-",
380 "addonName": "abpcustomization",
381 "addonVersion": "1.0.4a.74",
382 "fullAddon": "abpcustomization 1.0.4a.74",
383 "application": "firefox",
384 "applicationVersion": "25.0",
385 "fullApplication": "firefox 25.0",
386 }
387 ),
388 (
357 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.rdf?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.74&ma xAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} &appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVersion =25.0a1&updateType=97 HTTP/1.1" 302 867 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.adbloc kplus.org" "-"', 389 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.rdf?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.74&ma xAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} &appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVersion =25.0a1&updateType=97 HTTP/1.1" 302 867 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.adbloc kplus.org" "-"',
358 None 390 {
391 "ip": "1.2.3.4",
392 "country": "xy",
393 "time": datetime(2013, 7, 31, 17, 33, 8),
394 "day": 31,
395 "weekday": 2,
396 "hour": 17,
397 "month": "201307",
398 "file": "devbuilds/abpcustomization/update.rdf",
399 "query": "reqVersion=2&id=customization@adblockplus.org&version=1.0.4a .74&maxAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e 97384}&appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppV ersion=25.0a1&updateType=97",
400 "size": 867,
401 "referrer": "-",
402 "status": 302,
403 "ua": "Firefox",
404 "uaversion": "25.0",
405 "fullua": "Firefox 25.0",
406 "clientid": "-",
407 "addonName": "abpcustomization",
408 "addonVersion": "1.0.4a.74",
409 "fullAddon": "abpcustomization 1.0.4a.74",
410 "application": "firefox",
411 "applicationVersion": "25.0",
412 "fullApplication": "firefox 25.0",
413 }
359 ), 414 ),
360 ( 415 (
361 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.unknown?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.7 4&maxAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97 384}&appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVer sion=25.0a1&updateType=97 HTTP/1.1" 200 867 "-" "Mozilla/5.0 (Windows NT 6.1; Wi n64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.ad blockplus.org" "-"', 416 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.unknown?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.7 4&maxAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97 384}&appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVer sion=25.0a1&updateType=97 HTTP/1.1" 200 867 "-" "Mozilla/5.0 (Windows NT 6.1; Wi n64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.ad blockplus.org" "-"',
362 None 417 None
363 ), 418 ),
364 ( 419 (
365 '1.2.3.4 corrupted', 420 '1.2.3.4 corrupted',
366 None 421 None
367 ), 422 ),
368 ( 423 (
369 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.rdf?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.74&ma xAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} &appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVersion =25.0a1&updateType=97 HTTP/1.1" 200 867 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.adbloc kplus.org" "-"', 424 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/abpcustomizati on/update.rdf?reqVersion=2&id=customization@adblockplus.org&version=1.0.4a.74&ma xAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} &appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppVersion =25.0a1&updateType=97 HTTP/1.1" 200 867 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20130730 Firefox/25.0" "-" https" "en-US" "downloads.adbloc kplus.org" "-"',
370 { 425 {
371 "ip": "1.2.3.4", 426 "ip": "1.2.3.4",
372 "country": "xy", 427 "country": "xy",
373 "time": datetime(2013, 7, 31, 17, 33, 8), 428 "time": datetime(2013, 7, 31, 17, 33, 8),
374 "day": 31, 429 "day": 31,
375 "weekday": 2, 430 "weekday": 2,
376 "hour": 17, 431 "hour": 17,
377 "month": "201307", 432 "month": "201307",
378 "file": "devbuilds/abpcustomization/update.rdf", 433 "file": "devbuilds/abpcustomization/update.rdf",
379 "query": "reqVersion=2&id=customization@adblockplus.org&version=1.0.4a .74&maxAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e 97384}&appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppV ersion=25.0a1&updateType=97", 434 "query": "reqVersion=2&id=customization@adblockplus.org&version=1.0.4a .74&maxAppVersion=26.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e 97384}&appVersion=25.0a1&appOS=WINNT&appABI=x86_64-msvc&locale=en-US&currentAppV ersion=25.0a1&updateType=97",
380 "size": 867, 435 "size": 867,
381 "referrer": "-", 436 "referrer": "-",
437 "status": 200,
382 "ua": "Firefox", 438 "ua": "Firefox",
383 "uaversion": "25.0", 439 "uaversion": "25.0",
384 "fullua": "Firefox 25.0", 440 "fullua": "Firefox 25.0",
385 "clientid": "-", 441 "clientid": "-",
386 "addonName": "abpcustomization", 442 "addonName": "abpcustomization",
387 "addonVersion": "1.0.4a.74", 443 "addonVersion": "1.0.4a.74",
388 "fullAddon": "abpcustomization 1.0.4a.74", 444 "fullAddon": "abpcustomization 1.0.4a.74",
389 "application": "firefox", 445 "application": "firefox",
390 "applicationVersion": "25.0", 446 "applicationVersion": "25.0",
391 "fullApplication": "firefox 25.0", 447 "fullApplication": "firefox 25.0",
392 } 448 }
393 ), 449 ),
394 ( 450 (
395 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/adblockplusie/ update.json?addonName=adblockplusie&addonVersion=2.0&application=msie64&applicat ionVersion=10.0&platform=libadblockplus&platformVersion=1.0&lastVersion=0 HTTP/1 .1" 200 867 "-" "Adblock Plus" "-" https" "en-US" "downloads.adblockplus.org" "- "', 451 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/adblockplusie/ update.json?addonName=adblockplusie&addonVersion=2.0&application=msie64&applicat ionVersion=10.0&platform=libadblockplus&platformVersion=1.0&lastVersion=0 HTTP/1 .1" 200 867 "-" "Adblock Plus" "-" https" "en-US" "downloads.adblockplus.org" "- "',
396 { 452 {
397 "ip": "1.2.3.4", 453 "ip": "1.2.3.4",
398 "country": "xy", 454 "country": "xy",
399 "time": datetime(2013, 7, 31, 17, 33, 8), 455 "time": datetime(2013, 7, 31, 17, 33, 8),
400 "day": 31, 456 "day": 31,
401 "weekday": 2, 457 "weekday": 2,
402 "hour": 17, 458 "hour": 17,
403 "month": "201307", 459 "month": "201307",
404 "file": "devbuilds/adblockplusie/update.json", 460 "file": "devbuilds/adblockplusie/update.json",
405 "query": "addonName=adblockplusie&addonVersion=2.0&application=msie64& applicationVersion=10.0&platform=libadblockplus&platformVersion=1.0&lastVersion= 0", 461 "query": "addonName=adblockplusie&addonVersion=2.0&application=msie64& applicationVersion=10.0&platform=libadblockplus&platformVersion=1.0&lastVersion= 0",
406 "size": 867, 462 "size": 867,
407 "referrer": "-", 463 "referrer": "-",
464 "status": 200,
408 "ua": "ABP", 465 "ua": "ABP",
409 "uaversion": "", 466 "uaversion": "",
410 "fullua": "ABP ", 467 "fullua": "ABP ",
411 "clientid": "-", 468 "clientid": "-",
412 "addonName": "adblockplusie", 469 "addonName": "adblockplusie",
413 "addonVersion": "2.0", 470 "addonVersion": "2.0",
414 "fullAddon": "adblockplusie 2.0", 471 "fullAddon": "adblockplusie 2.0",
415 "application": "msie64", 472 "application": "msie64",
416 "applicationVersion": "10.0", 473 "applicationVersion": "10.0",
417 "fullApplication": "msie64 10.0", 474 "fullApplication": "msie64 10.0",
(...skipping 12 matching lines...) Expand all
430 "country": "xy", 487 "country": "xy",
431 "time": datetime(2013, 7, 31, 17, 33, 8), 488 "time": datetime(2013, 7, 31, 17, 33, 8),
432 "day": 31, 489 "day": 31,
433 "weekday": 2, 490 "weekday": 2,
434 "hour": 17, 491 "hour": 17,
435 "month": "201307", 492 "month": "201307",
436 "file": "adblockplusandroid-1.1.2.apk", 493 "file": "adblockplusandroid-1.1.2.apk",
437 "query": "", 494 "query": "",
438 "size": 49152, 495 "size": 49152,
439 "referrer": "https://adblockplus.org/en/android-install", 496 "referrer": "https://adblockplus.org/en/android-install",
497 "status": 200,
440 "ua": "Mobile Safari", 498 "ua": "Mobile Safari",
441 "uaversion": "4.0", 499 "uaversion": "4.0",
442 "fullua": "Mobile Safari 4.0", 500 "fullua": "Mobile Safari 4.0",
443 "clientid": "-", 501 "clientid": "-",
444 "installType": "install", 502 "installType": "install",
445 } 503 }
446 ), 504 ),
447 ( 505 (
448 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/adblockplus/ad blockplus-2.3.2.3712.xpi?update HTTP/1.1" 200 827261 "-" "Mozilla/5.0 (Macintosh ; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0" "-" https', 506 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /devbuilds/adblockplus/ad blockplus-2.3.2.3712.xpi?update HTTP/1.1" 200 827261 "-" "Mozilla/5.0 (Macintosh ; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0" "-" https',
449 { 507 {
450 "ip": "1.2.3.4", 508 "ip": "1.2.3.4",
451 "country": "xy", 509 "country": "xy",
452 "time": datetime(2013, 7, 31, 17, 33, 8), 510 "time": datetime(2013, 7, 31, 17, 33, 8),
453 "day": 31, 511 "day": 31,
454 "weekday": 2, 512 "weekday": 2,
455 "hour": 17, 513 "hour": 17,
456 "month": "201307", 514 "month": "201307",
457 "file": "devbuilds/adblockplus/adblockplus-2.3.2.3712.xpi", 515 "file": "devbuilds/adblockplus/adblockplus-2.3.2.3712.xpi",
458 "query": "update", 516 "query": "update",
459 "size": 827261, 517 "size": 827261,
460 "referrer": "-", 518 "referrer": "-",
519 "status": 200,
461 "ua": "Firefox", 520 "ua": "Firefox",
462 "uaversion": "22.0", 521 "uaversion": "22.0",
463 "fullua": "Firefox 22.0", 522 "fullua": "Firefox 22.0",
464 "clientid": None, 523 "clientid": None,
465 "installType": "update", 524 "installType": "update",
466 } 525 }
467 ), 526 ),
468 ( 527 (
469 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /exceptionrules.txt?addon Name=adblockplus&addonVersion=2.3.2&application=firefox&applicationVersion=22.0& platform=gecko&platformVersion=22.0&lastVersion=201307311503 HTTP/1.1" 200 14303 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firef ox/22.0" "-" https "en-US,en;q=0.5" "easylist-downloads.adblockplus.org" "-"', 528 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /exceptionrules.txt?addon Name=adblockplus&addonVersion=2.3.2&application=firefox&applicationVersion=22.0& platform=gecko&platformVersion=22.0&lastVersion=201307311503 HTTP/1.1" 200 14303 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firef ox/22.0" "-" https "en-US,en;q=0.5" "easylist-downloads.adblockplus.org" "-"',
470 { 529 {
471 "ip": "1.2.3.4", 530 "ip": "1.2.3.4",
472 "country": "xy", 531 "country": "xy",
473 "time": datetime(2013, 7, 31, 17, 33, 8), 532 "time": datetime(2013, 7, 31, 17, 33, 8),
474 "day": 31, 533 "day": 31,
475 "weekday": 2, 534 "weekday": 2,
476 "hour": 17, 535 "hour": 17,
477 "month": "201307", 536 "month": "201307",
478 "file": "exceptionrules.txt", 537 "file": "exceptionrules.txt",
479 "query": "addonName=adblockplus&addonVersion=2.3.2&application=firefox &applicationVersion=22.0&platform=gecko&platformVersion=22.0&lastVersion=2013073 11503", 538 "query": "addonName=adblockplus&addonVersion=2.3.2&application=firefox &applicationVersion=22.0&platform=gecko&platformVersion=22.0&lastVersion=2013073 11503",
480 "size": 14303, 539 "size": 14303,
481 "referrer": "-", 540 "referrer": "-",
541 "status": 200,
482 "ua": "Firefox", 542 "ua": "Firefox",
483 "uaversion": "22.0", 543 "uaversion": "22.0",
484 "fullua": "Firefox 22.0", 544 "fullua": "Firefox 22.0",
485 "clientid": "-", 545 "clientid": "-",
486 "addonName": "adblockplus", 546 "addonName": "adblockplus",
487 "addonVersion": "2.3.2", 547 "addonVersion": "2.3.2",
488 "fullAddon": "adblockplus 2.3.2", 548 "fullAddon": "adblockplus 2.3.2",
489 "application": "firefox", 549 "application": "firefox",
490 "applicationVersion": "22.0", 550 "applicationVersion": "22.0",
491 "fullApplication": "firefox 22.0", 551 "fullApplication": "firefox 22.0",
(...skipping 11 matching lines...) Expand all
503 "country": "xy", 563 "country": "xy",
504 "time": datetime(2013, 7, 31, 17, 33, 8), 564 "time": datetime(2013, 7, 31, 17, 33, 8),
505 "day": 31, 565 "day": 31,
506 "weekday": 2, 566 "weekday": 2,
507 "hour": 17, 567 "hour": 17,
508 "month": "201307", 568 "month": "201307",
509 "file": "easylist.txt", 569 "file": "easylist.txt",
510 "query": "_=1375446528229", 570 "query": "_=1375446528229",
511 "size": 326120, 571 "size": 326120,
512 "referrer": "-", 572 "referrer": "-",
573 "status": 200,
513 "ua": "Chrome", 574 "ua": "Chrome",
514 "uaversion": "28.0", 575 "uaversion": "28.0",
515 "fullua": "Chrome 28.0", 576 "fullua": "Chrome 28.0",
516 "clientid": "AdBlock/2.6.2", 577 "clientid": "AdBlock/2.6.2",
517 "addonName": "chromeadblock", 578 "addonName": "chromeadblock",
518 "addonVersion": "2.6.2", 579 "addonVersion": "2.6.2",
519 "fullAddon": "chromeadblock 2.6.2", 580 "fullAddon": "chromeadblock 2.6.2",
520 "application": "unknown", 581 "application": "unknown",
521 "applicationVersion": "unknown", 582 "applicationVersion": "unknown",
522 "fullApplication": "unknown unknown", 583 "fullApplication": "unknown unknown",
(...skipping 11 matching lines...) Expand all
534 "country": "xy", 595 "country": "xy",
535 "time": datetime(2013, 7, 31, 17, 33, 8), 596 "time": datetime(2013, 7, 31, 17, 33, 8),
536 "day": 31, 597 "day": 31,
537 "weekday": 2, 598 "weekday": 2,
538 "hour": 17, 599 "hour": 17,
539 "month": "201307", 600 "month": "201307",
540 "file": "easylistitaly.txt", 601 "file": "easylistitaly.txt",
541 "query": "", 602 "query": "",
542 "size": 85879, 603 "size": 85879,
543 "referrer": "-", 604 "referrer": "-",
605 "status": 200,
544 "ua": "Other", 606 "ua": "Other",
545 "uaversion": "", 607 "uaversion": "",
546 "fullua": "Other ", 608 "fullua": "Other ",
547 "clientid": "-", 609 "clientid": "-",
548 "addonName": "unknown", 610 "addonName": "unknown",
549 "addonVersion": "unknown", 611 "addonVersion": "unknown",
550 "fullAddon": "unknown unknown", 612 "fullAddon": "unknown unknown",
551 "application": "unknown", 613 "application": "unknown",
552 "applicationVersion": "unknown", 614 "applicationVersion": "unknown",
553 "fullApplication": "unknown unknown", 615 "fullApplication": "unknown unknown",
(...skipping 11 matching lines...) Expand all
565 "country": "xy", 627 "country": "xy",
566 "time": datetime(2013, 7, 31, 17, 33, 8), 628 "time": datetime(2013, 7, 31, 17, 33, 8),
567 "day": 31, 629 "day": 31,
568 "weekday": 2, 630 "weekday": 2,
569 "hour": 17, 631 "hour": 17,
570 "month": "201307", 632 "month": "201307",
571 "file": "easylistitaly.tpl", 633 "file": "easylistitaly.tpl",
572 "query": "", 634 "query": "",
573 "size": 85879, 635 "size": 85879,
574 "referrer": "-", 636 "referrer": "-",
637 "status": 200,
575 "ua": "Other", 638 "ua": "Other",
576 "uaversion": "", 639 "uaversion": "",
577 "fullua": "Other ", 640 "fullua": "Other ",
578 "clientid": "-", 641 "clientid": "-",
579 } 642 }
580 ), 643 ),
581 ( 644 (
582 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /notification.json?addonN ame=adblockpluschrome&addonVersion=1.5.3&application=chrome&applicationVersion=2 8.0.1500.72&platform=chromium&platformVersion=28.0.1500.72&lastVersion=201307292 310 HTTP/1.1" 200 299 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTM L, like Gecko) Chrome/28.0.1500.72 Safari/537.36" "-" https', 645 '1.2.3.4 - - [31/Jul/2013:12:03:08 -0530] "GET /notification.json?addonN ame=adblockpluschrome&addonVersion=1.5.3&application=chrome&applicationVersion=2 8.0.1500.72&platform=chromium&platformVersion=28.0.1500.72&lastVersion=201307292 310 HTTP/1.1" 200 299 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTM L, like Gecko) Chrome/28.0.1500.72 Safari/537.36" "-" https',
583 { 646 {
584 "ip": "1.2.3.4", 647 "ip": "1.2.3.4",
585 "country": "xy", 648 "country": "xy",
586 "time": datetime(2013, 7, 31, 17, 33, 8), 649 "time": datetime(2013, 7, 31, 17, 33, 8),
587 "day": 31, 650 "day": 31,
588 "weekday": 2, 651 "weekday": 2,
589 "hour": 17, 652 "hour": 17,
590 "month": "201307", 653 "month": "201307",
591 "file": "notification.json", 654 "file": "notification.json",
592 "query": "addonName=adblockpluschrome&addonVersion=1.5.3&application=c hrome&applicationVersion=28.0.1500.72&platform=chromium&platformVersion=28.0.150 0.72&lastVersion=201307292310", 655 "query": "addonName=adblockpluschrome&addonVersion=1.5.3&application=c hrome&applicationVersion=28.0.1500.72&platform=chromium&platformVersion=28.0.150 0.72&lastVersion=201307292310",
593 "size": 299, 656 "size": 299,
594 "referrer": "-", 657 "referrer": "-",
658 "status": 200,
595 "ua": "Chrome", 659 "ua": "Chrome",
596 "uaversion": "28.0", 660 "uaversion": "28.0",
597 "fullua": "Chrome 28.0", 661 "fullua": "Chrome 28.0",
598 "clientid": None, 662 "clientid": None,
599 "addonName": "adblockpluschrome", 663 "addonName": "adblockpluschrome",
600 "addonVersion": "1.5.3", 664 "addonVersion": "1.5.3",
601 "fullAddon": "adblockpluschrome 1.5.3", 665 "fullAddon": "adblockpluschrome 1.5.3",
602 "application": "chrome", 666 "application": "chrome",
603 "applicationVersion": "28.0", 667 "applicationVersion": "28.0",
604 "fullApplication": "chrome 28.0", 668 "fullApplication": "chrome 28.0",
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 "addonName": {"bar": {"hits": 1, "bandwidth": 200}} 730 "addonName": {"bar": {"hits": 1, "bandwidth": 200}}
667 }, 731 },
668 ), 732 ),
669 ] 733 ]
670 for info, section, ignored_fields, expected_result in tests: 734 for info, section, ignored_fields, expected_result in tests:
671 logprocessor.add_record(info, section, ignored_fields) 735 logprocessor.add_record(info, section, ignored_fields)
672 self.assertEqual(section, expected_result) 736 self.assertEqual(section, expected_result)
673 737
674 if __name__ == '__main__': 738 if __name__ == '__main__':
675 unittest.main() 739 unittest.main()
OLDNEW
« no previous file with comments | « sitescripts/stats/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld