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 | |
# ./just_view.py 500 1000 | |
import sys | |
import time | |
import random | |
import requests | |
TIMEOUT=120 |
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
% Save in ./couchdb top level | |
% | |
% $ ./dev/run ... | |
% $ remsh | |
% | |
% > bench_config:go(1000000, 100). | |
% #{max => 5.620738,min => 0.62035,total => 5633922, | |
% avg => 3.82163797,p50 => 4.568493,p75 => 5.314903, | |
% p90 => 5.519178} | |
% |
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 | |
# ./dev/run --admin=adm:pass -n1 | |
# "http" is httpie (https://httpie.io) | |
DB=http://adm:[email protected]:15984 | |
http -q delete $DB/db | |
http -q put $DB/db |
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 | |
# ./dev/run --admin=adm:pass -n1 | |
# "http" is httpie (https://httpie.io) | |
DB=http://adm:[email protected]:15984 | |
http -q delete $DB/db | |
http -q put $DB/db |
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 | |
# ./just_view.py 500 1000 | |
import sys | |
import time | |
import requests | |
TIMEOUT=120 | |
AUTH=('adm','pass') |
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 | |
# Create test DBs | |
echo "***** SETTING UP DBS *****" | |
curl -s -XDELETE 'http://adm:pass@localhost:15984/source' | |
curl -s -XDELETE 'http://adm:pass@localhost:15984/target' | |
curl -s -XPUT 'http://adm:pass@localhost:15984/source' | |
echo '{ |
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
// | |
// Examples: | |
// 1) Run all secenarios for 30sec with given user/pass: | |
// $ BENCH_DURATION=30s BENCH_USER=adm BENCH_PASS=pass run k6.js | |
// 2) Run just doc_update | |
// $ BENCH_SCENARIOS=doc_update k6 run $script.js | |
// 3) Run just doc_get at 10 rps, starting with 25k docs of 64KB each: | |
// $ BENCH_DOCS=25000 BENCH_SCENARIOS=doc_get BENCH_GET_RATE=10 k6 run $script.js | |
import http from 'k6/http'; |
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(bench). | |
-export([main/1]). | |
producer(Q) -> | |
receive | |
{produce, Pid, N, Size} -> | |
{ok, Dt} = produce(Q, N, erlang:monotonic_time(), Size), | |
Pid ! {produced, Dt}, | |
producer(Q) |
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 | |
# Run with an n=1 dev/run test cluster | |
# Needs python 3.7 minimum | |
# | |
# $ virtualenv -p python3 venv3 | |
# $ . venv3/bin/activate | |
# $ pip install requests | |
# make && ./dev/run -n 3 --with-haproxy --admin=adm:pass |
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
> recon_trace:calls({fabric, design_docs, fun(_) -> exception_trace() end}, 10, [ | |
{formatter, fun | |
({trace, _, exception_from, MFA, Err}) -> io_lib:format("|~p:~p|~n", [MFA,Err]); | |
({trace, _, return_from, MFA, {IsOk,_}=Res}) when IsOk =/= ok -> io_lib:format("|~p:~p|n", [MFA,Res]); | |
(_) -> "" | |
end} | |
]). |
NewerOlder