既存のHTTPベンチマークツールについて調査する。 いかにして性能を測定するのかなど調査。 ついでに SPDY, WebSocket, HTTP/2 のベンチマークできそうな余地とか探ってみる。
- apache bench
- Apache JMeter (?)
- http_load
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use JSON; | |
sub cap_cmd { | |
my ($cmdref) = @_; | |
pipe my $logrh, my $logwh | |
or die "Died: failed to create pipe:$!\n"; | |
my $pid = fork; |
# A simple Ruby method which checks if the current script | |
# is running as root, and if not, re-invokes itself by | |
# using the sudo command. | |
def sudome | |
if ENV["USER"] != "root" | |
exec("sudo #{ENV['_']} #{ARGV.join(' ')}") | |
end | |
end |
--- | |
- hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Create EC2 Instance with user-data | |
local_action: | |
module: ec2 | |
region: ap-northeast-1 | |
image: ami-efbe98ee # Ubuntu 12.04 LTS, hvm:ebs, 20140829.2 | |
instance_type: t2.micro |
openssl s_client -cipher EXPORT -connect domain.com:443 < /dev/null 2>/dev/null | grep SSL-Session | wc -l |
// (c) 2017 Yami Odymel | |
// This code is licensed under MIT license. | |
package main | |
import ( | |
"fmt" | |
"html" | |
"strconv" | |
) |
#!/usr/bin/ruby | |
#数値を16進数文字列に | |
p 65.to_s(16) #=> "41" | |
#数値をASCII文字に | |
p 65.chr #=> "A" | |
#文字列を16進数とみなして数値に | |
p "41".hex #=> 65 |
Why Should I Care (For Developers)
"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh) | |
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- |
<source> | |
type in_tail | |
# ... | |
tag raw.eventlog | |
</source> | |
<match raw.**> | |
type forward | |
log_level "#{ENV['DEBUG'] ? 'debug' : 'info'}" |