Skip to content

Instantly share code, notes, and snippets.

View pjvds's full-sized avatar
:octocat:
‏‏‎

Pieter Joost van de Sande pjvds

:octocat:
‏‏‎
View GitHub Profile
Now we setup a workspace by doing the following:
- Install Go as described in <http://golang.org/doc/install>
- Open an terminal and change the directory to your `$HOME` dir (My Documents for Windows).
- Create a new directory called `go` and add the following 3 folders to is: `src`, `pkg` and `bin`.
- Add an environment variable `GOPATH` with the value `$HOME/go`.
- Get the workshop code by executing: `go get github.com/pjvds/goworkshop`. The code will be located in `$GOPATH/src/github.com/pjvds/goworkshop`
- `cd` into that directory and open the `readme`.
https://github.com/pjvds/goworkshop/archive/master.zip
'.active.pane':
'ctrl-;': 'gocode:toggle'
'.autocomplete-plus input.hidden-input':
'enter': 'autocomplete-plus:confirm'
'ctrl-k': 'autocomplete-plus:select-next'
'ctrl-j': 'autocomplete-plus:select-previous'
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
sudo yum update
sudo yum install zsh terminator git tig mercurial vim
chsh --shell /bin/zsh
sudo yum install i3 i3-ipc i3status i3lock
ssh-keygen
echo "ADD PUBLIC KEY TO GITHUB NOW!"
sudo yum install autojump autojump-zsh
@pjvds
pjvds / setup-fdb-cluster-centos.sh
Last active August 29, 2015 14:13
provision fdb server
yum update -y
yum localinstall -y https://foundationdb.com/downloads/token/6af12ae4-e7f6-4200-983a-627cd5f9bd1b/key-value-store/3.0.5/foundationdb-clients-3.0.5-1.el7.x86_64.rpm https://foundationdb.com/downloads/token/6266c756-3c66-4913-8dfd-d234bdf66e79/key-value-store/3.0.5/foundationdb-server-3.0.5-1.el7.x86_64.rpm
sudo /usr/lib/foundationdb/make_public.py
echo '<?xml version="1.0" encoding="utf-8"?> <service> <short>fdb</short> <description>foundationdb server</description> <port protocol="tcp" port="4500-4600"/></service>' > /etc/firewalld/services/fdb.xml
restorecon /etc/firewalld/services/fdb.xml
chmod 640 /etc/firewalld/services/fdb.xml
firewall-cmd --reload
firewall-cmd --permanent --add-service=fdb
echo "Drtu0T4S:SdzTe7B4@109.74.5.254:4500,109.74.5.151:4500" > /etc/foundationdb/fdb.cluster
yum localinstall -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum install -y mosh
echo '<?xml version="1.0" encoding="utf-8"?> <service> <short>mosh</short> <description>mobile shell server</description> <port protocol="udp" port="60000-61000"/></service>' > /etc/firewalld/services/mosh.xml
restorecon /etc/firewalld/services/mosh.xml
chmod 640 /etc/firewalld/services/mosh.xml
firewall-cmd --reload
firewall-cmd --permanent --add-service=mosh
go test -bench=. github.com/gdamore/mangos/test
PASS
BenchmarkLatencyInp-6 100000 20056 ns/op
BenchmarkLatencyIPC-6 20000 100229 ns/op
BenchmarkLatencyTCP-6 10000 118770 ns/op
BenchmarkLatencyTLS-6 10000 185343 ns/op
BenchmarkTPut4kInp-6 200000 6807 ns/op 601.66 MB/s
BenchmarkTPut4kIPC-6 300000 6639 ns/op 616.93 MB/s
BenchmarkTPut4kTCP-6 200000 12042 ns/op 340.14 MB/s
BenchmarkTPut4kTLS-6 100000 15285 ns/op 267.96 MB/s
for i in $(seq 1 5); do echo "$i: " ; go run main.go -duration 1m ; echo "\n" ; sleep 15; done
1:
54053184 messages written in 1m0.14815918s, 898667msg/s, 175.521mb/s
/tmp/seqcask_bench_104758691/db.data: 28610mb
2:
54177408 messages written in 1m0.033588751s, 902452msg/s, 176.260mb/s
/tmp/seqcask_bench_734667518/db.data: 28610mb
for i in $(seq 1 5); do echo "$i: " ; go run main.go -duration 1m ; echo "\n" ; sleep 15; done
1:
54526336 messages written in 1m0.743716405s, 897646msg/s, 175.321mb/s
/tmp/seqcask_bench_838230236/db.data: 28610mb
2:
54309248 messages written in 1m0.051493969s, 904378msg/s, 176.636mb/s
/tmp/seqcask_bench_065558123/db.data: 28610mb
I0129 17:15:44.549211 74897 main.go:50] all clients done 2423150 msg in 5.364528279s, 451698.61616456957msg/s
I0129 17:15:49.549476 74897 main.go:50] all clients done 983900 msg in 5.000153634s, 196773.9537660774msg/s
I0129 17:15:54.549672 74897 main.go:50] all clients done 598550 msg in 5.00011583s, 119707.2268623825msg/s
I0129 17:15:59.550084 74897 main.go:50] all clients done 624350 msg in 5.000308165s, 124862.30436159529msg/s
I0129 17:16:04.550404 74897 main.go:50] all clients done 355000 msg in 5.000188944s, 70997.3170965837msg/s
I0129 17:16:09.550666 74897 main.go:50] all clients done 737150 msg in 5.000199473s, 147424.11857375913msg/s
I0129 17:16:14.551997 74897 main.go:50] all clients done 732900 msg in 5.00017349s, 146574.91414362905msg/s
I0129 17:16:19.553304 74897 main.go:50] all clients done 307550 msg in 5.000122972s, 61508.48723566153msg/s
I0129 17:16:24.621835 74897 main.go:50] all clients done 50450 msg in 5.055453359s, 9979.322608166505msg/s
I0129 17:16:29.704699 74897 mai