This file contains 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
# Container for a Python WSGI application. | |
FROM ubuntu:12.04 | |
MAINTAINER Tyler Treat <tyler.treat@webfilings.com> | |
RUN apt-get update | |
# Install Python tools | |
RUN apt-get install -y python python-dev python-distribute python-pip |
This file contains 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 ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
const maxThread = 16 |
This file contains 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 ( | |
"fmt" | |
"strconv" | |
"time" | |
"github.com/gdamore/mangos" | |
"github.com/gdamore/mangos/protocol/pub" | |
"github.com/gdamore/mangos/protocol/sub" |
This file contains 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 ( | |
"fmt" | |
"log" | |
"os" | |
"github.com/Shopify/sarama" | |
) |
This file contains 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 nsq | |
import ( | |
"github.com/bitly/go-nsq" | |
"github.com/tylertreat/Flotilla/flotilla-server/daemon/broker" | |
) | |
const topic = "test" | |
type NSQPeer struct { |
This file contains 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
func start(host string) { | |
pub := NewNSQPeer(host) | |
for i := 0; i < 1000; i++ { | |
message := getMessage() | |
pub.Send(message) | |
} | |
pub.Teardown() | |
} |
This file contains 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
$ iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP | |
$ iptables -A OUTPUT -m statistic --mode random --probability 0.1 -j DROP |
This file contains 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
$ tc qdisc add dev eth0 root netem delay 250ms loss 10% rate 1mbps |
This file contains 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
$ ipfw add 1 pipe 1 ip from me to any | |
$ ipfw add 2 pipe 1 ip from any to me | |
$ ipfw pipe 1 config delay 500ms bw 1Mbit/s plr 0.1 |
This file contains 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
$ tc qdisc add dev eth0 root netem delay 50ms 20ms |
OlderNewer