hnakamur@express:~/go/src/github.com/zchee/go-benchmarks/db$ go test -count=10 -run='^$' -bench=. -benchmem
goos: linux
goarch: amd64
pkg: github.com/zchee/go-benchmarks/db
BenchmarkGetBadger-2 5000000 399 ns/op 22.50 MB/s 40 B/op 2 allocs/op
BenchmarkGetBadger-2 5000000 390 ns/op 23.04 MB/s 40 B/op 2 allocs/op
BenchmarkGetBadger-2 5000000 390 ns/op 23.03 MB/s 40 B/op 2 allocs/op
BenchmarkGetBadger-2 5000000 391 ns/op 22.97 MB/s 40 B/op 2 allocs/op
BenchmarkGetBadger-2 5000000 391 ns/op 22.96 MB/s 40 B/op 2 allocs/op
This file contains hidden or 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 ( | |
crand "crypto/rand" | |
"encoding/binary" | |
"fmt" | |
"time" | |
"golang.org/x/exp/rand" | |
"gonum.org/v1/gonum/stat/distuv" |
This file contains hidden or 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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>network weathermap demo using cytoscape.js</title> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> | |
<script src="https://unpkg.com/cytoscape/dist/cytoscape.min.js"></script> | |
<script src="https://unpkg.com/[email protected]/cytoscape-automove.js"></script> | |
<style> | |
#cy { | |
position: absolute; |
This file contains hidden or 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 ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"syscall" | |
"time" | |
) |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Async await loop experiment</title> | |
<script> | |
function foo(i) { | |
return new Promise((resolve, reject) => { | |
console.log('foo', i); | |
resolve(); |
This file contains hidden or 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 ( | |
"testing" | |
"github.com/google/uuid" | |
linuxuuid "github.com/ybubnov/go-uuid" | |
) | |
func BenchmarkLinuxKernelUUIDv4(b *testing.B) { |
etcd01:/etc/etcd/etcd.yaml
debug: true
name: etcd01
data-dir: /var/lib/etcd
initial-advertise-peer-urls: https://10.155.92.228:2380
listen-peer-urls: https://10.155.92.228:2380
advertise-client-urls: https://10.155.92.228:2379
listen-client-urls: https://10.155.92.228:2379
This file contains hidden or 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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
@font-face { | |
font-family: 'Noto Sans JP'; | |
font-style: normal; | |
font-weight: 300; | |
src: local("Noto Sans CJK JP"), | |
/* NOTE: you need to use v5 (not v6) to have effect of font-feature-settings: "palt" */ | |
url(//fonts.gstatic.com/ea/notosansjapanese/v5/NotoSansJP-Light.woff2) format('woff2'), |
This file contains hidden or 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
対象バージョンは6.2.0 | |
bool | |
HttpTransact::is_response_cacheable(State *s, HTTPHdr *request, HTTPHdr *response) | |
の実装 | |
https://github.com/apache/trafficserver/blob/6.2.0/proxy/http/HttpTransact.cc#L6127 | |
is_response_cacheable の検索結果 | |
``` |
This file contains hidden or 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
# setup go | |
curl -sS https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | tar zxf - -C /usr/local | |
export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH | |
yum install -y make git | |
# setup go-carbon | |
go get -d github.com/lomik/go-carbon | |
cd $HOME/go/src/github.com/lomik/go-carbon |