2014/02/24 10:21:20 Benchmarking 1 iterations
2014/02/24 10:21:20 Benchmarking 100 iterations
2014/02/24 10:21:20 Benchmarking 10000 iterations
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
set -e | |
# Looks clever, is short, but removes your working directory on Mac OS X | |
# where `mktemp -d` fails. | |
cd "$(mktemp -d)" | |
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM | |
# ... |
The server for each of these benchmarks is based on https://github.com/rcrowley/go-tigertonic/tree/master/example. It was run as ./example >/dev/null 2>/dev/null
.
The client for each of these benchmarks is ab -H"Host: example.com" -c"100" -n"1000000" "http://127.0.0.1:8000/stuff/ID"
.
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
BUILD="betable3" | |
set -e -x | |
cd "$(mktemp -d)" | |
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM | |
git clone "git://github.com/s3tools/s3cmd.git" | |
mkdir -p "usr/bin" "usr/lib/python2.7/dist-packages" "usr/share/man/man1" | |
export PYTHONPATH="usr/lib/python2.7/dist-packages" |
I hereby claim:
- I am rcrowley on github.
- I am rcrowley (https://keybase.io/rcrowley) on keybase.
- I have a public key whose fingerprint is 16BF 2FED 3AEF 25E7 C901 FAA8 37AA AB88 53D2 F050
To claim this, I am signing this object:
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 lra | |
// LRA is a fixed-size cache which expires the least-recently added string. | |
type LRA struct { | |
i int | |
m map[string]struct{} | |
ss []string | |
} | |
func NewLRA(n int) *LRA { |
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
var data = { | |
_xpcom: Cc['@mozilla.org/preferences-service;1'] | |
.getService(Ci.nsIPrefService) | |
.getBranch('opendns.'), | |
get: function(k) { | |
var t = this._xpcom.getPrefType(k); | |
var fn; | |
if (Ci.nsIPrefBranch.PREF_BOOL == t) { fn = 'getBoolPref'; } |
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
#!/bin/sh | |
ipfw add deny udp from any to any 2222 | |
ipfw add deny udp from any to any 2223 |
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
#!/usr/bin/env python | |
""" | |
Django Shell Script | |
Richard Crowley <r@rcrowley.org> | |
I like organized directory structures. Because of the way the Python | |
path works, there wasn't a readily-available way to stash shell scripts | |
that needed access to Django goodness away in bin/. This is a bit | |
heavy on the scaffolding code (six lines, geez) but works. |
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
#!/bin/sh | |
# | |
# Drizzle dependency installer for Ubuntu Intrepid | |
# Richard Crowley <r@rcrowley.org> | |
# | |
if [ "." != $(dirname "$0") ] ; then | |
echo "[deps.sh] you must run deps.sh from the directory it is in" >&2 | |
exit 1 |
OlderNewer