Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{mode, {rate, 30}}.
{report_interval, 1}.
{duration, 20}.
{concurrent, 10}.
{driver, basho_bench_driver_http}.
%% Default generators, reference by the atoms key_generator and value_generator
{key_generator, {int_to_str, {partitioned_sequential_int, 50000}}}.
{value_generator, {fixed_bin, 10000}}.
%%% Headers: {Name, Headers}
% Name: atom()
% Headers: proplist()
{headers, [
{empty_h, []}
]}.
%%% Targets: {Name, {Host, Port, Path}}
%%% {Name, [{Host1, Port1, Path1},{Host2, Port2, Path2},...]}
%%% {Name, {Host, Port, {FormattedPath, Generators}}}
%%% {Name, [{Host1, Port1, {FormattedPath1, Generators1}},{Host2, Port2, {FormattedPath2, Generators2}},...]}
% Name: atom()
% Host: string()
% Port: integer()
% Path: string()
% FormattedPath: string() - formatted with io_lib:format
% Generators: list() - list of generators, can be key_generator or value_generator for default
{targets, [
{base_uri_t, {"127.0.0.1", 80, "/"}}
% {base_uri_t, {"10.0.3.120", 30167, "/"}}
]}.
%%% Operations: {{get|delete, Target}, Weight}
%%% {{get|delete, Target, Header}, Weight}
%%% {{put|post, Target, Value}, Weight}
%%% {{put|post, Target, Value, Header}, Weight}
% Target: atom() - defined target
% Header: atom() - defined header
% Value: atom() - defined value
% Weight: integer() - ratio of this operation to the rest (ThisWeight / TotalWeightSum = % of this Operation)
{operations, [
%% Get without a key
{{get, base_uri_t}, 1}
]}.
{http_disconnect_frequency, {ops, 1}}.
{generators, []}.
{values, []}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment