View args.cgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use Data::Dumper; | |
print "Content-Type: text/plain\n\n"; | |
print Dumper(\@ARGV); |
View bench.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
start = Time.now | |
`cat access.log.ltsv | fluent-agent-lite accesslog - 127.0.0.1` | |
puts "elapsed #{(Time.now - start)*1000} ms" |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"github.com/mizzy/consul-catalog" | |
"log" | |
"os" | |
"reflect" | |
"time" | |
) |
View ZabbixAPI.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ZabbixAPI; | |
use strict; | |
use warnings; | |
use Mouse; | |
use Try::Tiny; | |
use JSON; | |
use HTTP::Request::Common; | |
use LWP::UserAgent; |
View zabbix_get_eval.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ zabbix_get_eval.sh system.uname agent.version '[[ $1 =~ "foo" || $2 =~ ^1\.8 ]]' |
View result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl s.pl | |
keys:10000 size:1348738 | |
keys:20000 size:2708562 | |
keys:30000 size:3478562 | |
keys:40000 size:5428210 | |
keys:50000 size:6198210 | |
keys:60000 size:6968210 | |
keys:70000 size:10097506 | |
keys:80000 size:10867506 | |
keys:90000 size:11637506 |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net" | |
"net/http" | |
"syscall" | |
"log" | |
) | |
func main() { |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bench: packedforward test.log extlib | |
@echo "testing perl" | |
@cat test.log | PERL5LIB=extlib time perl ./packedforward.pl > /dev/null | |
@echo "testing go" | |
@cat test.log | time ./packedforward > /dev/null | |
check: packedforward test.log extlib | |
@head -1234 test.log | TIME=1407856567 PERL5LIB=extlib perl ./packedforward.pl | md5sum | |
@head -1234 test.log | TIME=1407856567 ./packedforward | md5sum |
View bench.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.12.1; | |
use Data::Validator; | |
use Data::Util; | |
use Benchmark qw/ :all /; | |
cmpthese 0, { | |
"Data::Validator" => sub { | |
dv(100); | |
}, |
View gist:8a2c30d40dec6403aa88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[fluentd] | |
$ fluentd -c fluentd.conf | |
2014-09-05 10:17:57 +0900 [info]: starting fluentd-0.10.53 | |
2014-09-05 10:17:57 +0900 [info]: reading config file path="fluentd.conf" | |
2014-09-05 10:17:57 +0900 [info]: gem 'fluentd' version '0.10.53' | |
2014-09-05 10:17:57 +0900 [info]: using configuration file: <ROOT> | |
<source> | |
type tail | |
tag ltsv | |
format ltsv |
OlderNewer