This file contains hidden or 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 | |
# still python2, sorry, old script | |
# pip install CouchDB | |
# ./viewsize.py | |
# file active external dtavg | |
# 18080120 17607050 14984706 45.973 | |
import argparse | |
import sys |
This file contains hidden or 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 | |
# Uses CouchDB (pip install CouchDB) | |
import sys, couchdb, time, os, uuid, argparse, random, traceback | |
from multiprocessing.dummy import Pool as ThreadPool | |
DB_URLS = [ | |
'http://adm:pass@localhost:15984', | |
'http://adm:pass@localhost:25984', |
This file contains hidden or 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/bash | |
set -e | |
URL=http://adm:pass@localhost:15984 | |
DB=${URL}/dbx | |
CFG=${URL}/_node/_local/_config | |
TMPFILE=/tmp/couch_largehex | |
DOCSIZE=100 |
This file contains hidden or 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/bash | |
set -e | |
URL=http://adm:pass@localhost:15984 | |
DB=${URL}/dbx | |
CFG=${URL}/_node/_local/_config | |
DOC=doc1 | |
TMPFILE=/tmp/couch_largehex |
This file contains hidden or 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 | |
http delete $DB/db | |
http put $DB/db'?q=4' | |
http put $DB/db/_design/d views:='{"v": {"map":"function(doc){emit(doc._id, 42);}"}}' | |
http put $DB/db/x a=b | |
http put $DB/db/y a=b | |
http put $DB/db/z a=b |
This file contains hidden or 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
% ./erlperf \ | |
'runner(Unsorted) -> lists:sort(Unsorted).' \ | |
--init_runner '[{rand:uniform(), I} || I <- lists:seq(1,500)].' \ | |
'runner(Sorted) -> lists:sort(Sorted).' \ | |
--init_runner 'lists:sort([{rand:uniform(), I} || I <- lists:seq(1,500)]).' | |
Code || QPS Time Rel | |
runner(Sorted) -> lists:sort(Sorted). 1 69223 14446 ns 100% | |
runner(Unsorted) -> lists:sort(Unsorted). 1 7158 140 us 10% | |
This file contains hidden or 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 python3 | |
import optparse | |
from dataclasses import dataclass | |
from collections import defaultdict | |
@dataclass | |
class Param: | |
name: str |
This file contains hidden or 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
% | |
% $ erl -name [email protected] | |
% | |
% $ erl -name [email protected] | |
% ([email protected])2> dist_perf:go('[email protected]'). | |
% started | |
% Sent:953MB/s, Hist:{6,0,0,12,0,0,0,0,0,0,0} RHist:{0,0,0,0,0,0,0,0,0,97,0} | |
% Sent:961MB/s, Hist:{1,0,0,12,0,0,0,0,0,0,0} RHist:{0,0,0,0,0,0,0,0,0,155,0} | |
% Sent:953MB/s, Hist:{6,0,0,12,0,0,0,0,0,0,0} RHist:{0,0,0,0,0,0,0,0,0,202,0} | |
% |
This file contains hidden or 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
-module(slow_tuples). | |
-export([ | |
run/0 | |
]). | |
run() -> | |
run(7500, 0.0008, {1647,841737,351137}). |
This file contains hidden or 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 | |
# | |
# Use a 3 node cluster | |
# | |
# Args examples: | |
# ./script.py -x 20 -n 100 -w 5 -p 10 -q | |
# ./script.py -x 100 -n 2 -p 20 -w 1 -t 10 | |
# ./script.py -x 101 -n 2 -p 10 -w 5 -t 2 |