Skip to content

Instantly share code, notes, and snippets.

View hidek's full-sized avatar

Hideo Kimura hidek

View GitHub Profile
use strict;
use warnings;
use Web::Scraper;
use URI;
use Data::Dumper;
my $s = scraper {
process '//p', 'foo[]' => sub {return {foo => 'bar', hoge => 'huga'}};
result qw/foo/;
use strict;
use warnings;
use DBI;
use Benchmark qw(:all);
my $count = 100;
my $loop = 100;
unlink('test.db');
use warnings;
use DBI;
use Benchmark qw(:all);
my $count = 100;
my $loop = 100;
cmpthese(
$count,
SV * getString(CFStringRef var) {
char *buf;
SV *sv;
CFIndex len = CFStringGetLength(val);
CFIndex max = CFStringGetMaximumSizeForEncoding(len, kCFStringEncodingUTF8) + 1;
Newxz(buf, max, char);
CFStringGetCString(val, buf, max, kCFStringEncodingUTF8);
CFRelease(val);
sv = newSVpv(buf, max);
Safefree(buf);
package DBIx::Class::EncodeColumns;
use strict;
use warnings;
use base qw/DBIx::Class/;
use Encode qw/encode decode is_utf8/;
__PACKAGE__->mk_classdata('_encode_columns');
__PACKAGE__->mk_classdata('in_encoding');
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software:
Server Hostname: localhost
Server Port: 9999
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software:
Server Hostname: localhost
Server Port: 12345
package Plack::Benchmark;
use strict;
use warnings;
use Plack::Loader;
use Test::TCP;
sub run_benchmark {
my ($class, $impl, $handler, $args) = @_;
@hidek
hidek / test.log
Created September 26, 2009 15:22
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.1.10 (be patient)
Server Software: Apache
Server Hostname: 192.168.1.10
Server Port: 80
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.1.10 (be patient)
Server Software: Apache
Server Hostname: 192.168.1.10
Server Port: 80