On nats_z2/0 (only NATS server):
$ sudo su
$ cd /var/vcap/bosh/bin
$ ./nats-server --port 12121 --user foo --pass bar
On api_z1/1 (Working CC, different AZ from NATS):
FROM ubuntu:precise | |
MAINTAINER Mark Rushakoff <mark.rushakoff@gmail.com> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev | |
RUN apt-get install -y wget |
On nats_z2/0 (only NATS server):
$ sudo su
$ cd /var/vcap/bosh/bin
$ ./nats-server --port 12121 --user foo --pass bar
On api_z1/1 (Working CC, different AZ from NATS):
→ go test -bench=. -benchmem -benchtime=5s | |
PASS | |
BenchmarkMakeLen_Index8-4 100000000 70.7 ns/op 64 B/op 1 allocs/op | |
BenchmarkMakeLen_Index16-4 100000000 90.7 ns/op 128 B/op 1 allocs/op | |
BenchmarkMakeLen_Index32-4 50000000 132 ns/op 256 B/op 1 allocs/op | |
BenchmarkMakeLen_Index64-4 30000000 212 ns/op 512 B/op 1 allocs/op | |
BenchmarkMakeLen_Index128-4 20000000 362 ns/op 1024 B/op 1 allocs/op | |
BenchmarkMakeLen_Index256-4 10000000 675 ns/op 2048 B/op 1 allocs/op | |
BenchmarkMakeLen_Index512-4 5000000 1371 ns/op 4096 B/op 1 allocs/op | |
BenchmarkMakeLen_Index1024-4 3000000 2573 ns/op 8192 B/op 1 allocs/op |
PASS | |
BenchmarkStringConcat-4 2000000 3901 ns/op | |
BenchmarkByteBuffer-4 10000000 966 ns/op |
FROM alpine:latest | |
RUN apk add --no-cache \ | |
bash \ | |
curl | |
COPY ./client.sh /client.sh | |
CMD ["/client.sh"] |
package resultparser | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
// Field is implemented by TimeField, IntField, FloatField, and StringField | |
type Field interface { | |
columnIndex([]string) (int, error) |
#!/bin/bash | |
set -e | |
# Default working directory to current directory, but allow override via WORKDIR environment variable. | |
WORKDIR=${WORKDIR:-$PWD} | |
NOW="$(date +%s)" | |
INFLUXDIR="$WORKDIR/influxdb-$NOW" | |
BACKUPDIR="$WORKDIR/backup-$NOW" |
package main | |
import ( | |
"fmt" | |
"os" | |
"golang.org/x/tools/go/packages" | |
) | |
func main() { |
go list -test ./... | sort -u > /tmp/full_list_with_tests | |
go list -test -json ./... | jq -r '.Deps | map(select(startswith("github.com/YOUR/PROJECT/"))) | join("\n")' | sort -u > /tmp/is_depended_with_tests | |
comm -23 /tmp/full_list_with_tests /tmp/is_depended_with_tests | grep -v '.test$' |
go list -json ./... | jq -r '.Imports | map(select(contains("."))) | join("\n")' | sort | uniq -c | sort -n |