view release on metacpan or search on metacpan
lib/Archive/Har/Entry.pm view on Meta::CPAN
return $old;
}
}
sub time {
my ($self) = @_;
my $timings = $self->timings();
my $total = 0;
my $found = 0;
foreach my $timing (
$timings->blocked(), $timings->dns(),
$timings->connect(), $timings->send(),
$timings->wait(), $timings->receive(),
$timings->ssl(),
)
{
if ( defined $timing ) {
$found = 1;
$total += $timing;
}
}
lib/Archive/Har/Entry/Timings.pm view on Meta::CPAN
our $VERSION = '0.21';
sub _DOES_NOT_APPLY { return -1 }
sub new {
my ( $class, $params ) = @_;
my $self = {};
bless $self, $class;
if ( defined $params ) {
if ( defined $params->{blocked} ) {
$self->blocked( $params->{blocked} );
}
if ( defined $params->{dns} ) {
$self->dns( $params->{dns} );
}
if ( defined $params->{connect} ) {
$self->connect( $params->{connect} );
}
$self->send( $params->{send} );
$self->wait( $params->{wait} );
$self->receive( $params->{receive} );
lib/Archive/Har/Entry/Timings.pm view on Meta::CPAN
}
foreach my $key ( sort { $a cmp $b } keys %{$params} ) {
if ( $key =~ /^_[[:alnum:]]+$/smx ) { # private fields
$self->$key( $params->{$key} );
}
}
}
return $self;
}
sub blocked {
my ( $self, $new ) = @_;
my $old = $self->{blocked};
if ( @_ > 1 ) {
if ( defined $new ) {
$self->{blocked} = $new + 0;
}
else {
$self->{blocked} = _DOES_NOT_APPLY();
}
}
if ( ( defined $old ) && ( $old eq _DOES_NOT_APPLY() ) ) {
return;
}
else {
return $old;
}
}
lib/Archive/Har/Entry/Timings.pm view on Meta::CPAN
Carp::croak(
"$name is not specified in the HAR 1.2 spec and does not start with an underscore"
);
}
return $old;
}
sub TO_JSON {
my ($self) = @_;
my $json = {};
if ( defined $self->blocked() ) {
$json->{blocked} = $self->blocked() + 0;
}
else {
$json->{blocked} = _DOES_NOT_APPLY();
}
if ( defined $self->dns() ) {
$json->{dns} = $self->dns() + 0;
}
else {
$json->{dns} = _DOES_NOT_APPLY();
}
if ( defined $self->connect() ) {
$json->{connect} = $self->connect() + 0;
}
lib/Archive/Har/Entry/Timings.pm view on Meta::CPAN
=head1 SYNOPSIS
use Archive::Har();
my $http_archive_string = '"log": { "version": "1.1", .... ';
my $har = Archive::Har->new();
$har->string($http_archive_string);
foreach my $entry ($har->entries()) {
my $timings = $entry->timings();
$timings->comment("Something interesting here");
print "Blocked: " . $timings->blocked() . "\n";
print "DNS: " . $timings->dns() . "\n";
print "Connect: " . $timings->connect() . "\n";
print "Send: " . $timings->send() . "\n";
print "Wait: " . $timings->wait() . "\n";
print "Receive: " . $timings->receive() . "\n";
print "Ssl: " . $timings->ssl() . "\n";
print "Comment: " . $timings->comment() . "\n";
}
=head1 DESCRIPTION
This Module is intended to provide an interface to create/read/update
Timings objects in HTTP Archive (HAR) files.
=head1 SUBROUTINES/METHODS
=head2 new
returns a new Timings object
=head2 blocked
returns the time in milliseconds spent waiting for a network connection. The function will return undef if it does not apply to the current request
=head2 dns
returns the time in milliseconds spent in DNS resolution of the host name. The function will return undef if it does not apply to the current request
=head2 connect
returns the time in milliseconds spent making the TCP connection. The function will return undef if it does not apply to the current request
"size": 0,
"mimeType": "text/html"
},
"redirectURL": "https://www.google.com.au/?gfe_rd=cr&ei=nwX0WIrDFaPM8gfYsLC4Bw",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 396
},
"cache": {},
"timings": {
"blocked": 0.422000000071421,
"dns": -1,
"connect": -1,
"send": 0.276000000212662,
"wait": 27.904999999918818,
"receive": 1.327999999830336,
"ssl": -1
},
"serverIPAddress": "144.131.80.163",
"connection": "312",
"pageref": "page_4"
"mimeType": "text/html",
"text": "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en-AU\"><head><meta content=\"/images/branding/googleg/1x/googleg_standard_color_128dp.png\" itemprop=\"image\"><link href=\"/images/branding/produ...
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 68060
},
"cache": {},
"timings": {
"blocked": 0.254000000040833,
"dns": -1,
"connect": -1,
"send": 0.11799999992945198,
"wait": 217.72700000019572,
"receive": 140.78499999959573,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"connection": "1029",
"pageref": "page_4"
"text": "iVBORw0KGgoAAAANSUhEUgAAAPAAAABYCAYAAADLGnoRAAATpklEQVR42uxdCXRU1Rm+FgbBKopLsYpr3UoVlZkJkWInbyaJaDm2iuCOnlbB5ShHPVq3GiUzSZAjIuICVlrABRGX0oqYRHGltgooamVRUCuQyQRIZt4AITHT/zt4ig0v77/vzZ2XCbnfOffMMJnl8e797r//V2hoaGhoaGjsiSgry/woMiF1S...
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.242999999954918,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0.9810000001380121,
"receive": 1.5020000000731655,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"pageref": "page_4"
},
"mimeType": "text/javascript",
"text": "/* _GlobalPrefix_ */\n/* _Module_:quantum */\ntry{\nvar s_,s_aaa=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError(\"ES3 does not support getters and setters.\"...
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.133999999889056,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 2.3220000002766037,
"receive": 9.42799999984345,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"pageref": "page_4"
},
"text": "iVBORw0KGgoAAAANSUhEUgAAARAAAABcCAYAAACm5+q2AAAXGElEQVR4Ae1dC5QcVZm+OtOBwC6CwiqCCBIQkAWSqpqEkNhdt3uyQeJBgSi4uwoIihtchJgF5TGarpoJicACCkFANuGBBhcQH5DMJAH0CCjIQ1hYfBAeZPoRkklVdR6ZZHrvt+a4pLdn5r/Vdbuqh/udc0/nMdPTZ+rWV//9/+//fhYHZnat2...
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.209000000268134,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0.32899999996516194,
"receive": 1.0449999999764263,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"pageref": "page_4"
},
"text": "iVBORw0KGgoAAAANSUhEUgAAAhAAAABECAYAAADQgAxBAAAcZElEQVR4Ae3dB2wbV57H8RFFSYxsS5StRGed7Uy8K2VtxQ7tOPW8WXrT45xX8G3x4Rqvty28kuB6iEV6ZZqdrWZ67pSia2n2HYjgeuX1nuXVrdgwbXeNLe++D/gLeBg8jIbjGZEi3x/4YDxv3qPLlvnpvZlHz5UrV71TN9xww8+3wRNtj3Mcx...
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.191999999969994,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0.27700000009645,
"receive": 1.3169999997444393,
"ssl": -1
},
"serverIPAddress": "216.58.196.131",
"pageref": "page_4"
},
"mimeType": "text/javascript",
"text": "/* _GlobalPrefix_ */\n/* _Module_:sy1p */\ntry{\nvar s_vja,s_wja,s_1i,s_xja,s_2i,s_yja={};s_D(\"sy1p\");var s_3i=function(a){s_K(this,a,0,2,null,null)};s_g(s_3i,s_J);s_3i.prototype.jh=function(){return s_L(this,1)};var s_zja={};v...
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 36140
},
"cache": {},
"timings": {
"blocked": 0.595999999859487,
"dns": -1,
"connect": -1,
"send": 0.21999999989930097,
"wait": 24.480000000039613,
"receive": 7.008000000041616,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"connection": "1029",
"pageref": "page_4"
"text": "iVBORw0KGgoAAAANSUhEUgAAABsAAAAXCAIAAAB1dKN5AAAAyUlEQVR4AWP4////buoBoGkMQOon9QDQNNqYOGrixdvPSiZtjG1aA0fxLevwI3wmrj94pXDilsKJmzC15fZtQeZGNayGIyAXp4lLdp4vm7r9Pxg0zduLjwEDQBOTWlajm/gOBsgz0ad4PtwELCYmt60DaiAeEWUi2G7CzsTnxscwQLaJcBPQT...
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.179000000116503,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0.29699999959120704,
"receive": 0.4870000002483723,
"ssl": -1
},
"serverIPAddress": "144.131.80.163",
"pageref": "page_4"
},
},
{
"name": "expires",
"value": "Fri, 13 Apr 2018 21:01:54 GMT"
}
],
"cookies": [],
"content": {
"size": 136732,
"mimeType": "text/javascript",
"text": "/* _GlobalPrefix_ */\nthis.gbar_=this.gbar_||{};(function(_){var window=this;\n/* _Module_:syp */\ntry{\nvar On=function(){};_.y(On,Error);_.Pn=function(){this.b=\"pending\";this.B=[];this.w=this.C=void 0};_.ae(_.Pn);var Qn=funct...
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.233000000207539,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 1.9750000001295112,
"receive": 6.022999999913738,
"ssl": -1
},
"serverIPAddress": "216.58.196.131",
"pageref": "page_4"
},
"mimeType": "text/javascript",
"text": "/* JS */ gapi.loaded_0(function(_){var window=this;\nvar ba,ca,da,ha,ia,Fa,Ga;\nfor(_.g,_.n=function(a){return function(){return ba[a].apply(this,arguments)}},_.r=function(a,b){return ba[a]=b},_._DumpException=function(a){throw a...
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.241000000187341,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0.602999999955501,
"receive": 2.27900000027148,
"ssl": -1
},
"serverIPAddress": "216.58.196.142",
"pageref": "page_4"
},
"text": "iVBORw0KGgoAAAANSUhEUgAAAKcAAAGaCAYAAABqhVMrAABBWUlEQVR4AeybBXDqaBeGT7e67u7uVkivrEASrq67u7u7sFOg8ru7u/u/Rtfd3d2BOoErFbLvmQ53vpwJ2kKv0Jmnhp+8OR5anr6OC9pNeru1p96RWqhHrOP1SPLoQCh5oNkxvCGgVYsa0/4G5n8702xErFP9keSdIG1EUnYOXoVg7zDC6S0B1...
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": 0,
"_transferSize": 0
},
"cache": {},
"timings": {
"blocked": 0.236999999742693,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0.34099999993486596,
"receive": 0.7490000002690064,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"pageref": "page_4"
},
"text": "",
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 45
},
"cache": {},
"timings": {
"blocked": 0.617000000147527,
"dns": -1,
"connect": -1,
"send": 0.329999999848951,
"wait": 162.87499999998553,
"receive": 0.43300000015725004,
"ssl": -1
},
"serverIPAddress": "203.37.15.172",
"connection": "1029",
"pageref": "page_4"
"text": "R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=",
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 275
},
"cache": {},
"timings": {
"blocked": 1.50200000007317,
"dns": 165.34400000000483,
"connect": 58.429999999589,
"send": 0.13600000011101088,
"wait": 172.453000000133,
"receive": 0.7179999997784989,
"ssl": 31.019000000015012
},
"serverIPAddress": "216.58.196.146",
"connection": "1816",
"pageref": "page_4"
"text": "R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=",
"encoding": "base64"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 275
},
"cache": {},
"timings": {
"blocked": 0.403000000005704,
"dns": 166.9099999999163,
"connect": 58.25200000026601,
"send": 0.1059999999600052,
"wait": 169.034999999894,
"receive": 0.7540000001426392,
"ssl": 30.498000000079998
},
"serverIPAddress": "216.58.196.146",
"connection": "1817",
"pageref": "page_4"
t/fiddler2.t view on Meta::CPAN
#!perl -T
use Test::More tests => 6;
use Archive::Har();
use JSON();
my $har = Archive::Har->new();
my $fiddler_string = <<'_FIDDLER2_RESULTS_';
{"log":{"creator":{"comment":"http://www.fiddler2.com", "version":"4.6.0.2", "name":"Fiddler"}, "entries":[{"startedDateTime":"2015-09-05T17:11:08.5888671+10:00", "response":{"headersSize":306, "httpVersion":"HTTP/1.1", "content":{"compression":0,...
_FIDDLER2_RESULTS_
ok($har->string($fiddler_string), "Successfully read Fiddler har archive for http://search.cpan.org/recent");
ok($har->version() eq '1.2', "INPUT: Fiddler produces a version 1.2 http archive");
ok($har->creator()->name() eq 'Fiddler', "INPUT: Fiddler's creator name is 'Fiddler'");
ok($har->creator()->version() eq '4.6.0.2', "INPUT: Fiddler's creator version is '4.6.0.2'");
ok($har->creator()->comment() eq 'http://www.fiddler2.com', "INPUT: Fiddler's creator comment is 'http://www.fiddler2.com'");
my $fiddler_ref = $har->hashref();
ok(!exists $fiddler_ref->{log}->{entries}->[0]->{request}->{postData}, "Empty postData entry stripped from Fiddler output");
t/firebug_cookies_n_cache.t view on Meta::CPAN
"content": {
"mimeType": "text/html",
"size": 322
},
"redirectURL": "https://www.google.com/accounts/recovery?hl=en&gaps=AHwGkRnIr9MHrtSt185ONR1lo-pCrkYz6yM6OsQ7bVzmMns3l13BWiR9PLWiDq0l6rLX2DvH8M3twg6yaZyOdFqKlMIWNA9HmA&service=mail&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F",
"headersSize": 726,
"bodySize": 322
},
"cache": {},
"timings": {
"blocked": 1,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 169,
"receive": 1
},
"serverIPAddress": "173.194.72.84",
"connection": "443"
},
{
t/firebug_cookies_n_cache.t view on Meta::CPAN
"content": {
"mimeType": "text/html",
"size": 2533
},
"redirectURL": "",
"headersSize": 865,
"bodySize": 2533
},
"cache": {},
"timings": {
"blocked": 1,
"dns": 0,
"connect": 709,
"send": 0,
"wait": 260,
"receive": 1
},
"serverIPAddress": "74.125.237.116",
"connection": "443"
},
{
t/firebug_cookies_n_cache.t view on Meta::CPAN
"mimeType": "text/javascript",
"size": 39903,
"text": "(function (){ function e(a){throw a;}var l=void 0,m=!0,n=null,p=!1,aa=window,r=Error,ba=parseInt,s=parseFloat,da=Function,ea=document,fa=Array,t=Math;function ga(a,b){return a.width=b}function ha(a,b){return a.innerHTML=b}functio...
},
"redirectURL": "",
"headersSize": 396,
"bodySize": 15612
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 32,
"receive": 31
},
"serverIPAddress": "74.125.237.116",
"connection": "443"
},
{
t/firebug_cookies_n_cache.t view on Meta::CPAN
"mimeType": "text/css",
"size": 33756,
"text": "/* Copyright 2012 Google Inc. All Rights Reserved. */\n.goog-inline-block{position:relative;display:-moz-inline-box;display:inline-block}* html .goog-inline-block{display:inline}*:first-child+html .goog-inline-block{display:inlin...
},
"redirectURL": "",
"headersSize": 387,
"bodySize": 5128
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 134,
"send": 0,
"wait": 35,
"receive": 2
},
"serverIPAddress": "74.125.237.116",
"connection": "443"
},
{
t/firebug_cookies_n_cache.t view on Meta::CPAN
"content": {
"mimeType": "image/gif",
"size": 35
},
"redirectURL": "",
"headersSize": 341,
"bodySize": 35
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 346,
"receive": 0
},
"serverIPAddress": "74.125.237.30",
"connection": "443"
},
{
t/firebug_cookies_n_cache.t view on Meta::CPAN
"content": {
"mimeType": "image/gif",
"size": 0
},
"redirectURL": "",
"headersSize": 215,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 162,
"receive": 0
},
"serverIPAddress": "74.125.237.116",
"connection": "443"
}
]
t/firebug_get.t view on Meta::CPAN
"mimeType": "text/html",
"size": 6771,
"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"><html><head><meta name=\"robots\" content=\"noindex,nofollow\"><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"><...
},
"redirectURL": "",
"headersSize": 253,
"bodySize": 2665
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 31,
"connect": 796,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"mimeType": "text/css",
"size": 25703,
"text": ".invisible{visibility:hidden;}.k_float{z-index:9999999;position:fixed!important;position:absolute;}.k_bottom{bottom:0;_top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.scrol...
},
"redirectURL": "",
"headersSize": 313,
"bodySize": 6163
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"value": "Accept-Encoding"
},
{
"name": "Content-Encoding",
"value": "gzip"
}
],
"content": {
"mimeType": "application/x-javascript",
"size": 176455,
"text": "if(typeof YAHOO==\"undefined\"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var a=arguments,h=null,k,l,j;for(k=0;k<a.length;k=k+1){j=(\"\"+a[k]).split(\".\");h=YAHOO;for(l=(j[0]==\"YAHOO\")?1:0;l<j.length;l=l+1){h[j[l]]=h[j[l...
},
"redirectURL": "",
"headersSize": 344,
"bodySize": 56690
},
"cache": {},
"timings": {
"blocked": 297,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 811,
"receive": 546
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 609
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 609
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 562,
"send": 0,
"wait": 280,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 923
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 923
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 562,
"send": 0,
"wait": 280,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 1978
},
"redirectURL": "",
"headersSize": 291,
"bodySize": 1978
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 577,
"send": 0,
"wait": 297,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 3221
},
"redirectURL": "",
"headersSize": 291,
"bodySize": 3221
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 546,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 542
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 542
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 562,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 373
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 373
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 562,
"send": 0,
"wait": 280,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 300
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 300
},
"cache": {},
"timings": {
"blocked": 842,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 3393
},
"redirectURL": "",
"headersSize": 291,
"bodySize": 3393
},
"cache": {},
"timings": {
"blocked": 842,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "application/x-javascript",
"size": 0
},
"redirectURL": "",
"headersSize": 234,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 827,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"mimeType": "application/x-javascript",
"size": 16046,
"text": "if (nrn) nrn('d',[{\"a\":\"Get AM General Hummer News and Info Spy Photos, Videos, Breaking News\",\"d\":\"insideline.com\",\"m\":0,\"s\":\"boss\",\"p\":1,\"c\":\"/y.js?u2=http%3A%2F%2F0.r.msn.com%2F%3Fld%3D4vJZprmSxfDprpRqDzePwP...
},
"redirectURL": "",
"headersSize": 267,
"bodySize": 5554
},
"cache": {},
"timings": {
"blocked": 827,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 265
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "application/x-javascript",
"size": 0
},
"redirectURL": "",
"headersSize": 234,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 842,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 266,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 62,
"connect": 827,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 271
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 271
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 15,
"connect": 562,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1150
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1150
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 62,
"connect": 827,
"send": 0,
"wait": 577,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1406
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1406
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 62,
"connect": 858,
"send": 0,
"wait": 593,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 894
},
"redirectURL": "",
"headersSize": 270,
"bodySize": 894
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 62,
"connect": 858,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 5430
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 5430
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 62,
"connect": 827,
"send": 0,
"wait": 655,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1150
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1150
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 62,
"connect": 858,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1150
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1150
},
"cache": {},
"timings": {
"blocked": 1170,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1150
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1150
},
"cache": {},
"timings": {
"blocked": 1201,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 15086
},
"redirectURL": "",
"headersSize": 272,
"bodySize": 15086
},
"cache": {},
"timings": {
"blocked": 1186,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 1279,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 318
},
"redirectURL": "",
"headersSize": 270,
"bodySize": 318
},
"cache": {},
"timings": {
"blocked": 1420,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 1451,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 593,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1406
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1406
},
"cache": {},
"timings": {
"blocked": 1467,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 655,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 894
},
"redirectURL": "",
"headersSize": 270,
"bodySize": 894
},
"cache": {},
"timings": {
"blocked": 1498,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1150
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1150
},
"cache": {},
"timings": {
"blocked": 1529,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 3638
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 3638
},
"cache": {},
"timings": {
"blocked": 1701,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 592,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 1779,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 1310,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 4286
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 4286
},
"cache": {},
"timings": {
"blocked": 1794,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2044,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 858,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2059,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 921,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2122,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 686,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2293,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 266,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 3638
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 3638
},
"cache": {},
"timings": {
"blocked": 2465,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 296,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 13934
},
"redirectURL": "",
"headersSize": 272,
"bodySize": 13934
},
"cache": {},
"timings": {
"blocked": 2559,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 1138,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2761,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 734,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 280,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2808,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 297,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 43
},
"redirectURL": "",
"headersSize": 269,
"bodySize": 43
},
"cache": {},
"timings": {
"blocked": 2902,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 998,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/x-icon",
"size": 1150
},
"redirectURL": "",
"headersSize": 271,
"bodySize": 1150
},
"cache": {},
"timings": {
"blocked": 2980,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 561,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"mimeType": "application/x-javascript",
"size": 343,
"text": "if (nrq) nrq([{\"r\":\"\",\"s\":\"format\"},{\"r\":\"\",\"s\":\"technical\"},{\"r\":\"\",\"s\":\"version\"},{\"r\":\"\",\"s\":\"support\"},{\"r\":\"\",\"s\":\"software\"},{\"r\":\"\",\"s\":\"preservation\"},{\"r\":\"\",\"s\":\"fi...
},
"redirectURL": "",
"headersSize": 267,
"bodySize": 161
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 655,
"send": 0,
"wait": 328,
"receive": 0
},
"serverIPAddress": "176.34.131.233",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 149
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 149
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 593,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 212
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 212
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 608,
"send": 0,
"wait": 281,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
},
{
t/firebug_get.t view on Meta::CPAN
"content": {
"mimeType": "image/png",
"size": 160
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 160
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 561,
"send": 0,
"wait": 265,
"receive": 0
},
"serverIPAddress": "46.51.216.187",
"connection": "443"
}
]
t/firebug_post.t view on Meta::CPAN
},
"cache": {
"afterRequest": {
"expires": "1970-01-01T00:00:00.000Z",
"lastAccess": "2012-03-23T05:31:06.000Z",
"eTag": "",
"hitCount": 119
}
},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 381,
"receive": 0
},
"serverIPAddress": "184.72.106.52",
"connection": "443"
},
{
t/firebug_post.t view on Meta::CPAN
"mimeType": "application/x-javascript",
"size": 691,
"text": "var dna=[{\"u\":\"https://en.wikipedia.org/wiki/Darwin_Core_Archive#Archive_Format\",\"h\":\"Darwin Core <b>Archive</b>: <b>Archive Format</b>\",\"a\":\"Sharing entire datasets instead of using pageable web services like DiGIR an...
},
"redirectURL": "",
"headersSize": 267,
"bodySize": 451
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"send": 0,
"wait": 760,
"receive": 0
},
"serverIPAddress": "184.72.106.52",
"connection": "443"
},
{
t/firebug_post.t view on Meta::CPAN
"mimeType": "application/x-javascript",
"size": 13874,
"text": "if (nrn) nrn('d',[{\"a\":\"An <b>archive</b> <b>format</b> is the file <b>format</b> of an <b>archive</b> file. The <b>archive</b> <b>format</b> is determined by the file archiver. ... Retrieved from "<b>http</b>://en.wikipe...
},
"redirectURL": "",
"headersSize": 267,
"bodySize": 4718
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 723,
"send": 0,
"wait": 1095,
"receive": 0
},
"serverIPAddress": "184.72.106.52",
"connection": "443"
},
{
t/firebug_post.t view on Meta::CPAN
"mimeType": "application/x-javascript",
"size": 225,
"text": "if (nrq) nrq([{\"r\":\"\",\"s\":\"files\"},{\"r\":\"\",\"s\":\"compression\"},{\"r\":\"\",\"s\":\"please\"},{\"r\":\"\",\"s\":\"javascript\"},{\"r\":\"\",\"s\":\"version\"},{\"r\":\"\",\"s\":\"string\"},{\"r\":\"\",\"s\":\"submit...
},
"redirectURL": "",
"headersSize": 267,
"bodySize": 126
},
"cache": {},
"timings": {
"blocked": 1,
"dns": 0,
"connect": 910,
"send": 0,
"wait": 419,
"receive": 0
},
"serverIPAddress": "176.34.131.233",
"connection": "443"
}
]
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
},
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"lastAccess" : "2012-04-03T22:13:50.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 23,
"dns" : 1,
"connect" : 1106,
"send" : 0,
"wait" : 163,
"receive" : 1
},
"serverIPAddress" : "173.194.72.84",
"connection" : "2"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
},
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"lastAccess" : "2012-04-03T22:13:51.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 10,
"dns" : 1,
"connect" : 318,
"send" : 0,
"wait" : 712,
"receive" : 27
},
"serverIPAddress" : "74.125.237.112",
"connection" : "3"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"expires" : "2012-04-27T14:25:49.000Z",
"lastAccess" : "2012-04-03T22:13:52.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 16,
"dns" : -1,
"connect" : -1,
"send" : 0,
"wait" : 31,
"receive" : 59
},
"serverIPAddress" : "74.125.237.112",
"connection" : "3"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"expires" : "2012-05-02T07:50:40.000Z",
"lastAccess" : "2012-04-03T22:13:52.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 14,
"dns" : 1,
"connect" : 55,
"send" : 0,
"wait" : 31,
"receive" : 2
},
"serverIPAddress" : "74.125.237.112",
"connection" : "4"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"expires" : "2013-03-28T16:40:39.000Z",
"lastAccess" : "2012-04-03T22:13:52.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 13,
"dns" : 4,
"connect" : 166,
"send" : 0,
"wait" : 31,
"receive" : 3
},
"serverIPAddress" : "74.125.237.143",
"connection" : "5"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"expires" : "2012-04-04T00:01:28.000Z",
"lastAccess" : "2012-04-03T22:13:53.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 2,
"dns" : 16,
"connect" : 92,
"send" : 0,
"wait" : 30,
"receive" : 30
},
"serverIPAddress" : "74.125.237.30",
"connection" : "6"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
},
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"lastAccess" : "2012-04-03T22:13:53.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 11,
"dns" : -1,
"connect" : -1,
"send" : 0,
"wait" : 33,
"receive" : 0
},
"serverIPAddress" : "74.125.237.30",
"connection" : "6"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
},
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"lastAccess" : "2012-04-03T22:13:53.000Z",
"eTag" : "",
"hitCount" : 1
}
},
"timings" : {
"blocked" : 51,
"dns" : -1,
"connect" : -1,
"send" : 0,
"wait" : 163,
"receive" : 0
},
"serverIPAddress" : "74.125.237.112",
"connection" : "3"
},
{
t/httpwatch_cookies_n_cache.t view on Meta::CPAN
"cache" : {
"beforeRequest" : null,
"afterRequest" : {
"expires" : "2013-04-03T22:13:49.000Z",
"lastAccess" : "2012-04-03T22:13:53.000Z",
"eTag" : "",
"hitCount" : 5
}
},
"timings" : {
"blocked" : 69,
"dns" : -1,
"connect" : -1,
"send" : 0,
"wait" : 161,
"receive" : 1
},
"serverIPAddress" : "74.125.237.112",
"connection" : "4"
}
]
t/mandatory_optional.t view on Meta::CPAN
(((($har->entries())[0])->request()->query_string())[0])->_private("value");
$hash = JSON::decode_json($har->string());
ok($hash->{log}->{entries}->[0]->{request}->{queryString}->[0]->{_private} eq "value", "new _private value is correct (3)");
ok((((($har->entries())[0])->request()->query_string())[0])->_private() eq "value", "new _private value is correct (4)");
eval { (((($har->entries())[0])->request()->query_string())[0])->does_not_exist() };
ok($@ =~ /^does_not_exist is not specified in the HAR 1.2 spec and does not start with an underscore/, "does_not_exist access throws an exception");
ok($hash->{log}->{entries}->[0]->{timings}->{comment} eq "test timings", "comment is correct");
ok($hash->{log}->{entries}->[0]->{timings}->{_private} eq "timings", "_private is correct");
(($har->entries())[0])->timings()->ssl(undef);
(($har->entries())[0])->timings()->blocked(undef);
(($har->entries())[0])->timings()->connect(undef);
(($har->entries())[0])->timings()->dns(undef);
(($har->entries())[0])->timings()->_private(undef);
$hash = JSON::decode_json($har->string());
ok($hash->{log}->{entries}->[0]->{timings}->{ssl} == -1, "timings ssl unavailable is correct");
ok($hash->{log}->{entries}->[0]->{timings}->{blocked} == -1, "timings blocked unavailable is correct");
ok($hash->{log}->{entries}->[0]->{timings}->{connect} == -1, "timings connect unavailable is correct");
ok($hash->{log}->{entries}->[0]->{timings}->{dns} == -1, "timings dns unavailable is correct");
ok(!exists $hash->{log}->{entries}->[0]->{timings}->{_private}, "new _private value is correct (2)");
(($har->entries())[0])->timings()->_private("value");
$hash = JSON::decode_json($har->string());
ok($hash->{log}->{entries}->[0]->{timings}->{_private} eq "value", "new _private value is correct (3)");
ok((($har->entries())[0])->timings()->_private() eq "value", "new _private value is correct (4)");
eval { (($har->entries())[0])->timings()->does_not_exist() };
ok($@ =~ /^does_not_exist is not specified in the HAR 1.2 spec and does not start with an underscore/, "does_not_exist access throws an exception");
t/pingdom.t view on Meta::CPAN
#!perl -T
use Test::More tests => 64;
use Archive::Har();
use JSON();
my $har = Archive::Har->new();
my $pingdom_string = '{"log":{"version":"1.2","creator":{"name":"Pingdom Tools","version":"","comment":"Test the load time of a web page at http://tools.pingdom.com/fpt"},"pages":[{"startedDateTime":"2012-03-23T01:22:05.820Z","id":"https://duckduckgo...
ok($har->string($pingdom_string), "Successfully read pingdom har archive for https://duckduckgo.com/?q=http+archive+specification");
ok($har->version() eq '1.2', "INPUT: Pingdom produces a version 1.2 http archive");
ok($har->creator()->name() eq 'Pingdom Tools', "INPUT: Pingdom's creator name is 'Pingdom Tools'");
ok($har->creator()->version() eq '', "INPUT: Pingdom's creator version is the empty string");
ok($har->creator()->comment() eq 'Test the load time of a web page at http://tools.pingdom.com/fpt', "INPUT: Pingdom's creator comment is advertising for Pingdom");
ok(scalar $har->pages() == 1, "INPUT: Pingdom's archive contains 1 page");
my ($firstPage) = $har->pages();
ok($firstPage->started_date_time() eq '2012-03-23T01:22:05.820Z', "INPUT: Pingdom's archive page has a startedDateTime of '2012-03-23T01:22:05.820Z'");
ok($firstPage->id() eq 'https://duckduckgo.com/?q=http+archive+specification', "INPUT: Pingdom's archive page has an id of 'https://duckduckgo.com/?q=http+archive+specification'");
t/pingdom.t view on Meta::CPAN
ok(scalar $har->entries() == 46, "INPUT: Pingdom's archive contains 46 entries");
my ($firstEntry) = $har->entries();
ok($firstEntry->pageref() eq 'https://duckduckgo.com/?q=http+archive+specification', "INPUT: Pingdom's archive first entry has a pageref of 'https://duckduckgo.com/?q=http+archive+specification'");
ok($firstEntry->started_date_time() eq '2012-03-23T01:22:05.820Z', "INPUT: Pingdom's archive first entry has a startedDateTime of '2012-03-23T01:22:05.820Z'");
ok($firstEntry->time() == 173, "INPUT: Pingdom's archive first entry has a time of 173");
ok($firstEntry->request()->method() eq 'GET', "INPUT: Pingdom's archive first entry request has a method of 'GET'");
ok($firstEntry->request()->url() eq 'https://duckduckgo.com/?q=http+archive+specification', "INPUT: Pingdom's archive first entry request has a url of 'https://duckduckgo.com/?q=http+archive+specification'");
ok($firstEntry->request()->http_version() eq 'HTTP/1.1', "INPUT: Pingdom's archive first entry request has a version of 'HTTP/1.1'");
ok(scalar $firstEntry->request()->cookies() == 0, "INPUT: Pingdom's archive first entry request has an empty cookie list");
ok(scalar $firstEntry->request()->headers() == 9, "INPUT: Pingdom's archive first entry request has 9 headers");
ok(scalar $firstEntry->timings()->blocked() == 0, "INPUT: Pingdom's archive first entry timings has a blocked value of 0");
ok(not(defined $firstEntry->timings()->dns()), "INPUT: Pingdom's archive first entry timings does not have a defined value for dns");
ok(scalar $firstEntry->timings()->connect() == 125, "INPUT: Pingdom's archive first entry timings has a connect value of 125");
ok(scalar $firstEntry->timings()->send() == 0, "INPUT: Pingdom's archive first entry timings has a send value of 0");
ok(scalar $firstEntry->timings()->wait() == 28, "INPUT: Pingdom's archive first entry timings has a wait value of 28");
ok(scalar $firstEntry->timings()->receive() == 1, "INPUT: Pingdom's archive first entry timings has a receive value of 1");
ok(scalar $firstEntry->timings()->ssl() == 19, "INPUT: Pingdom's archive first entry timings has a ssl value of 19");
$firstEntry->timings()->ssl(20);
ok($firstEntry->time() == 174, "INPUT: Pingdom's archive first entry has a time of 174 (after \$entry->timings()->ssl() was set to 20");
$firstEntry->timings()->ssl(19);
ok($firstEntry->time() == 173, "INPUT: Pingdom's archive first entry has a time of 173 (after \$entry->timings()->ssl() was reset to 19");
t/pingdom.t view on Meta::CPAN
ok($pingdom_ref->{log}->{pages}->[0]->{pageTimings}->{onLoad} == -1, "OUTPUT: Pingdom's archive page has an onLoad of -1 after being set to '-1'");
ok(scalar @{$pingdom_ref->{log}->{entries}} == 46, "OUTPUT: Pingdom's archive contains 46 entries");
ok($pingdom_ref->{log}->{entries}->[0]->{pageref} eq 'https://duckduckgo.com/?q=http+archive+specification', "OUTPUT: Pingdom's archive first entry has a pageref of 'https://duckduckgo.com/?q=http+archive+specification'");
ok($pingdom_ref->{log}->{entries}->[0]->{startedDateTime} eq '2012-03-23T01:22:05.820Z', "OUTPUT: Pingdom's archive first entry has a startedDateTime of '2012-03-23T01:22:05.820Z'");
ok($pingdom_ref->{log}->{entries}->[0]->{time} == 173, "OUTPUT: Pingdom's archive first entry has a time of 173");
ok($pingdom_ref->{log}->{entries}->[0]->{request}->{method} eq 'GET', "OUTPUT: Pingdom's archive first entry request has a method of 'GET'");
ok($pingdom_ref->{log}->{entries}->[0]->{request}->{url} eq 'https://duckduckgo.com/?q=http+archive+specification', "OUTPUT: Pingdom's archive first entry request has a url of 'https://duckduckgo.com/?q=http+archive+specification'");
ok($pingdom_ref->{log}->{entries}->[0]->{request}->{httpVersion} eq 'HTTP/1.1', "OUTPUT: Pingdom's archive first entry request has a httpVersion of 'HTTP/1.1'");
ok(scalar @{$pingdom_ref->{log}->{entries}->[0]->{request}->{cookies}} == 0, "OUTPUT: Pingdom's archive first entry request has an empty cookie list");
ok(scalar @{$pingdom_ref->{log}->{entries}->[0]->{request}->{headers}} == 9, "OUTPUT: Pingdom's archive first entry request has 9 headers");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{blocked} == 0, "OUTPUT: Pingdom's archive first entry timings has a blocked value of 0");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{dns} == -1, "OUTPUT: Pingdom's archive first entry timings has a dns value of -1");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{connect} == 125, "OUTPUT: Pingdom's archive first entry timings has a connect value of 125");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{send} == 0, "OUTPUT: Pingdom's archive first entry timings has a send value of 0");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{wait} == 28, "OUTPUT: Pingdom's archive first entry timings has a wait value of 28");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{receive} == 1, "OUTPUT: Pingdom's archive first entry timings has a receive value of 1");
ok($pingdom_ref->{log}->{entries}->[0]->{timings}->{ssl} == 19, "OUTPUT: Pingdom's archive first entry timings has a ssl value of 19");