-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from nathanaschbacher/nathan_dev
summary.r changes, PB Search testing, and ETS testing.
- Loading branch information
Showing
5 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{mode, max}. | ||
|
||
{duration, 3}. | ||
|
||
{concurrent, 4}. | ||
|
||
{driver, basho_bench_driver_ets}. | ||
|
||
{operations, [{get,1}, {put,1}]}. | ||
|
||
{key_generator, {int_to_bin_littleendian, {uniform_int, 1000}}}. | ||
|
||
{value_generator, {fixed_bin, 100000}}. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{mode, max}. | ||
|
||
{duration, 10}. | ||
|
||
{concurrent, 3}. | ||
|
||
{driver, basho_bench_driver_riakc_pb}. | ||
|
||
%%{key_generator, {int_to_bin, {uniform_int, 10000}}}. | ||
%%{value_generator, {fixed_bin, 10000}}. | ||
|
||
{riakc_pb_ips, [ | ||
{{127,0,0,1}, 10017}, %% {Ip, Port} | ||
{{127,0,0,1}, 10027}, %% {Ip, Port} | ||
{{127,0,0,1}, [10037, 10047]} %% {Ip, Ports} | ||
]}. | ||
|
||
{riakc_pb_search_queries, [{<<"index">>, "query", [{rows,10}]}]}. %% last element of the tuple is a list of Search options/params. | ||
|
||
{operations, [{search, 1}]}. | ||
|
||
%% {query_step_interval, 60}. %% time in seconds to run each query before switching to the next one in the list, default is 60 seconds. | ||
%% {operations, [{search_interval, 1}]}. | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-module(basho_bench_driver_ets). | ||
|
||
-export([new/1, | ||
run/4]). | ||
|
||
new(_Id) -> | ||
EtsTable = ets:new(basho_bench, [ordered_set]), | ||
{ok, EtsTable}. | ||
|
||
run(get, KeyGen, _ValueGen, EtsTable) -> | ||
Start = KeyGen(), | ||
case ets:lookup(EtsTable, Start) of | ||
[] -> | ||
{ok, EtsTable}; | ||
[{_Key, _Val}] -> | ||
{ok, EtsTable}; | ||
Error -> | ||
{error, Error, EtsTable} | ||
end; | ||
|
||
run(put, KeyGen, ValueGen, EtsTable) -> | ||
Object = {KeyGen(), ValueGen()}, | ||
ets:insert(EtsTable, Object), | ||
{ok, EtsTable}; | ||
|
||
run(delete, KeyGen, _ValueGen, EtsTable) -> | ||
Start = KeyGen(), | ||
ets:delete(EtsTable, Start), | ||
{ok, EtsTable}. | ||
|
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