Skip to content

Instantly share code, notes, and snippets.

View spacejam's full-sized avatar
💭
internet denier

Tyler Neely spacejam

💭
internet denier
View GitHub Profile

Go:

package main                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                               
import (                                                                                                                                                                                                                                                       
  "fmt"                                                                                                                                                                                                                                                 
@spacejam
spacejam / coco_trip_report.md
Last active October 19, 2017 20:41
coco trip report
@spacejam
spacejam / go.md
Last active March 29, 2017 21:40

atomic

import "sync/atomic"

    func AddInt32(addr *int32, delta int32) (new int32)
    func AddInt64(addr *int64, delta int64) (new int64)
    func AddUint32(addr *uint32, delta uint32) (new uint32)
    func AddUint64(addr *uint64, delta uint64) (new uint64)
    func AddUintptr(addr *uintptr, delta uintptr) (new uintptr)
    func CompareAndSwapInt32(addr *int32, old, new int32) (swapped bool)

Keybase proof

I hereby claim:

  • I am spacejam on github.
  • I am spacejam (https://keybase.io/spacejam) on keybase.
  • I have a public key ASAodEUe3RATNs5j_08BrNOk7WFSPAzIwOfguCXTPhiQ6wo

To claim this, I am signing this object:

sudo yum update
sudo yum install -y tar wget
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo cat <<EOF > /etc/yum.repos.d/wandisco-svn.repo
[WANdiscoSVN]
name=WANdisco SVN Repo 1.9
enabled=1
baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
  • step 1: get the toolbox and enter it (it's a container):
wget https://raw.githubusercontent.com/mesosphere/docker-containers/master/dcos-debug/toolbox
chmod +x toolbox
./toolbox
  • step 2: collect the trace (this example runs for 30s):
perf record -F 99 -p <marathon PID> -g -- sleep 30
mesos-docker-executor: /lib64/libcurl.so.4: no version information available (required by /opt/mesosphere/packages/mesos--d3f2ef31fb91d0928f838d25ff7bc580aad7ccc3/lib/libmesos-0.24.1.so)
I1001 17:50:50.365727 2985 exec.cpp:133] Version: 0.24.1
I1001 17:50:50.367946 2989 exec.cpp:207] Executor registered on slave 20151001-152803-2080636938-5050-1237-S0
+ /work/bin/etcd-mesos-scheduler -alsologtostderr=true -framework-name=etcd -cluster-size=3 -master=zk://master.mesos:2181/mesos -zk-framework-persist=zk://master.mesos:2181/etcd -v=1 -auto-reseed=true -reseed-timeout=240 -sandbox-disk-limit=4096 -sandbox-cpu-limit=1 -sandbox-mem-limit=2048 -admin-port=10000 -driver-port=10001 -artifact-port=10002 -framework-weburi=http://etcd.marathon.mesos:10000/stats
I1001 17:50:53.471500 6 app.go:225] Found stored framework ID in Zookeeper, attempting to re-use: 20151001-152803-2080636938-5050-1237-0001
I1001 17:50:56.474654 6 scheduler.go:225] found failover_timeout = 168h0m0s
I1001 17:50:56.474747 6 sch
015-10-01 17:22:52.532734 I | etcdmain: etcd Version: 2.2.0
2015-10-01 17:22:52.532802 I | etcdmain: Git SHA: e4561dd
2015-10-01 17:22:52.532812 I | etcdmain: Go Version: go1.4.2
2015-10-01 17:22:52.532819 I | etcdmain: Go OS/Arch: linux/amd64
2015-10-01 17:22:52.532827 I | etcdmain: setting maximum number of CPUs to 1, total number of available CPUs is 4
2015-10-01 17:22:53.533696 I | etcdmain: listening for peers on http://ip-10-0-1-8.us-west-2.compute.internal:1025
2015-10-01 17:22:54.534580 I | etcdmain: listening for client requests on http://ip-10-0-1-8.us-west-2.compute.internal:1026
2015-10-01 17:22:55.535620 I | netutil: resolving ip-10-0-1-8.us-west-2.compute.internal:1025 to 10.0.1.8:1025
2015-10-01 17:22:56.536490 I | netutil: resolving ip-10-0-1-8.us-west-2.compute.internal:1025 to 10.0.1.8:1025
2015-10-01 17:22:56.536578 I | etcdserver: name = etcd-1443720152
@spacejam
spacejam / bench.go
Last active December 15, 2015 21:50
package main
import (
"log"
"net"
"github.com/spacejam/loghisto"
"commands": [
{
"name": "pause container",
"start": "docker pause {{ target.id }}",
"stop": "docker unpause {{ target.id }}"
},
{
"name": "restart container",
"start": "docker restart {{ target.id }}",
"stop": ""