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 | |
| import json | |
| import time | |
| import requests | |
| import string | |
| import random | |
| S = requests.session() |
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 | |
| http -q delete $DB/db | |
| http -q put $DB/db | |
| http post $DB/db/_bulk_docs new_edits:='false' docs:='[{"_id":"d1", "_revisions":{"start":2, "ids":["x", "z"]}, "data":1}, {"_id":"d1", "data":2, "_revisions":{"start":2, "ids":["y", "z"]}}, {"_id":"d1", "data":3, "_deleted":true, "_revisions":{"start":2, "ids":["w", "z"]}}]' | |
| http -q put $DB/db/d1/att2y'?rev=2-y' data=2y | |
| http -q put $DB/db/d1/att2x'?rev=2-x' data=2x | |
| echo "Without a filter with atts" |
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 | |
| # | |
| # make && ./dev/run -n 1 --admin=adm:pass | |
| # ./multiuser.py --users-scheme=simple --users-salt="abc" --users-hash-sha1 --tries 100 | |
| import copy | |
| import sys | |
| import time | |
| import threading | |
| import os |
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 otp252@127.0.0.1 | |
| % > c(distblockleak). | |
| % | |
| % $ erl -name otp251@127.0.0.1 | |
| % > c(distblockleak), distblockleak:go('otp252@127.0.0.1', "./junk.bin", 10000, 100, 200). | |
| % | |
| -module(distblockleak). |
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
| %% Reproducer attempt for https://github.com/erlang/otp/issues/7801 | |
| %% It's supposed to model the couch_file.erl from Apache CouchDB | |
| %% | |
| %% Example run: | |
| %% c(ioblock), ioblock:go("./junk.bin", 8192, 60, 4000). | |
| %% - Create a temporary junk.bin file with 8GB of random data | |
| %% - Spawn 60 gen_servers to handle preads from the file | |
| %% - Spawn 4000 caller processes to call the servers with pread commands | |
| %% | |
| %% Note: run the first time without measuring to create the larger file. |
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
| global | |
| maxconn 10000 | |
| spread-checks 5 | |
| defaults | |
| mode http | |
| log global | |
| option httplog | |
| log stdout format raw local0 | |
| balance roundrobin |
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(statbench). | |
| -export([ | |
| go_counter/2, | |
| go_gauge/2, | |
| go_hist/2 | |
| ]). | |
| go_counter(N, X) -> | |
| go(N, X, fun upstat_counter/1). |
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(ringbench). | |
| -export([go/2]). | |
| go(M, N) when is_integer(M), M > 1, is_integer(N), N > 1 -> | |
| io:format("~p processes, ~p messages~n", [N, M]), | |
| T = erlang:monotonic_time(), | |
| {FirstPid, FirstRef} = spawn_monitor(fun() -> first() end), | |
| LastPid = lists:foldl(fun(_, Pid) -> spawn_link(fun() -> loop(Pid) end) end, FirstPid, lists:seq(2, N)), | |
| io:format("processes spawned in ~p usec~n", [dt(T)]), |
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(estone). | |
| % Copied form OTP erts/emulator/test/estone_SUITE.erl | |
| % run with estone:estone(). May take a few minutes to run. | |
| % | |
| -export([estone/0]). | |
| %% Internal exports for EStone tests | |
| -export([ |
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(fbench). | |
| % fbench:bench(). | |
| % * created db fbench-1683604564287312344 [{q,64},{n,3}] in 17869 usec | |
| % * put 200 docs with 2823 usec per op | |
| % * get doc 20000X with 1157 usec per op | |
| % * get security 20000X with 225 usec per op | |
| % ok | |
| -export([ |