Hateburo: kazeburo hatenablog

SRE / 運用系小姑 / Goを書くPerl Monger

Entries from 2013-06-17 to 1 day

Furlでサーバへの接続に掛かった時間とレスポンスに掛かった時間を取得する方法

AnyEvent::HTTPの続き package MyFurl::HTTP; use strict; use warnings; use base qw/Furl::HTTP/; use Time::HiRes; sub response_time { if ( @_ > 1 ) { $_[0]->{times} = $_[1]; } $_[0]->{times}; } sub connect : method { my($self, $host, $port, $…

How to keepalive more than one connections with Furl - Furlで2個以上の接続を維持する技

Furl can do keepalive connection by passing connection pool object to connection_pool option, By default, Furl::ConnectionCache is used. But Furl::ConnectionCache can keep only one connection at once. To do keepalive more one connections. …

AnyEvent::HTTPでサーバへの接続に掛かった時間とレスポンスに掛かった時間を取得する方法

深遠な理由で、connect(2) に掛かった時間と、リクエストを送ってレスポンスが得られるまでに掛かった時間を出したい #!/usr/bin/perl use strict; use warnings; use AnyEvent::HTTP; use AnyEvent::Socket; use AnyEvent::DNS::Cache::Simple; use Time::H…