$ ab -c 100 -n 10000 http://localhost:8000/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>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)Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software:
Server Hostname: localhost
Server Port: 8000
Document Path: /
Document Length: 1048576 bytes
Concurrency Level: 100
Time taken for tests: 4.346 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 10486510000 bytes
HTML transferred: 10485760000 bytes
Requests per second: 2300.74 [#/sec] (mean)Time per request: 43.464 [ms](mean)Time per request: 0.435 [ms](mean, across all concurrent requests)Transfer rate: 2356128.80 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max
Connect: 0 0 0.4 1 5
Processing: 16 43 6.2 45 60
Waiting: 0 14 12.9 13 41
Total: 17 43 6.5 46 60
ERROR: The median and mean for the initial connection time are more than twice the standard
deviation apart. These results are NOT reliable.
Percentage of the requests served within a certain time(ms) 50% 46
66% 49
75% 49
80% 49
90% 50
95% 51
98% 54
99% 55
100% 60 (longest request)
cd /home/sudix/batches/batch_18
rbenv local 1.8.7-p374
su
cd /home/sudix/batches/batch_18
bundle install
exitcd /home/sudix/batches/batch_19
rbenv local 1.9.3-p448
su
cd /home/sudix/batches/batch_19
bundle install
exit
できたけどなんかゴチャゴチャしてる感じがありますね・・・。きっともっと素敵な書き方があるはず。
ということでググってみると、 Sieve of Eratosthenes in Scala
こちらの記事を発見。おお、Stream使うとこんなにもスッキリ書けるんですね。確かに衝撃的。
まだまだScala力が足りません。
url:http://sudix.github.iotitle:Sudix Blogsubtitle:my blog about programming, IT, etc...author:sudixdescription:about programming, IT, etc...date_format:"%Y/%m/%d"email:"youremailaddress@example.com"
$ bundle exec rake setup_github_pages
Enter the read/write url for your repository
(For example, 'git@github.com:your_username/your_username.github.io) or 'https://github.com/your_username/your_username.github.io')Repository url: git@github.com:sudix/sudix.github.io
rm -rf _deploy
mkdir _deploy
cd _deploy
Initialized empty Git repository in /home/sudix/apps/octopress/_deploy/.git/
[master (root-commit) 5a3c02f] Octopress init
1 file changed, 1 insertion(+) create mode 100644 index.html
cd -
---
## Now you can deploy to http://sudix.github.io/sudix with `rake deploy` ##