毎回bundle installするのはコストがかかるため、Gemfileに変更がない場合はキャッシュしたい。
参考 https://blog.freks.jp/github-action-cache/
+ - name: cache bundle directory
+ uses: actions/cache@v1
+ with:
毎回bundle installするのはコストがかかるため、Gemfileに変更がない場合はキャッシュしたい。
参考 https://blog.freks.jp/github-action-cache/
+ - name: cache bundle directory
+ uses: actions/cache@v1
+ with:
| $ ./file_read [~/d/src/go] | |
| ReadFile:148545 elapsed:167.706µs | |
| ReadLine:144946 elapsed:209.144µs | |
| Scanner:144946 elapsed:553.246µs |
| $ ./map | |
| map[1:hoge] | |
| &map[1:hoge] | |
| map[1:hogehoge] | |
| &map[1:hogehoge] |
| package regexp | |
| import ( | |
| "regexp" | |
| "testing" | |
| ) | |
| func BenchmarkRegexp1(b *testing.B) { | |
| re := regexp.MustCompile(`(iTunes)/(\d+)\.(\d+)`) | |
| for i := 0; i < b.N; i++ { |
depのコードを読んで面白いとか思った所
https://github.com/golang/dep/blob/4105d3a/context.go#L200-208 こういった任意の型のコンテナの探索はGenericsだ!と息巻く人もいると思うけど、stringしか扱わないならベタで書いたほうが僕は読みやすくていいと思う。
なんか毎回毎回、gitのソースコードを読んで、ref-filter.cのvalid_atomだなーと確認するのが超めんどい。なんとかしたい。
| uuidgen | tr '[:upper:]' '[:lower:]' # Mac OS(darwin) generate default uppercase |
| package main | |
| import ( | |
| "bytes" | |
| "flag" | |
| "fmt" | |
| "net" | |
| "runtime" | |
| "strconv" | |
| "sync" |
| require 'benchmark' | |
| N = 5 | |
| TRY = 1_000_000 | |
| campaign = Struct.new("Campagin", :id) | |
| campaings = [] | |
| N.times { |i| campaings << campaign.new(i+1) } | |
| def each(ary) |
< ab -n 10000 -c 100 'http://127.0.0.1:8080/loadtest'
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests