Skip to content

Commit e4eaebd

Browse files
author
Mathieu Lecarme
committed
Better response, removing unused options.
1 parent 397ba04 commit e4eaebd

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

src/basho_bench_driver_carbon.erl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66

77
-record(state, {
88
host,
9-
port,
10-
keys
9+
port
1110
}).
1211

1312
new(_Id) ->
1413
Host = basho_bench_config:get(carbon_server, "127.0.0.1"),
1514
Port = basho_bench_config:get(carbon_port, 2003),
16-
Keys = basho_bench_config:get(carbon_keys, 10),
17-
{ok, #state{host=Host, port=Port, keys=Keys}}.
15+
{ok, #state{host=Host, port=Port}}.
1816

1917
run(set, KeyGen, _ValueGen, State) ->
20-
% io:format("SENDING: ~s\n", [Msg]),
2118
case gen_tcp:connect(State#state.host,
2219
State#state.port,
2320
[list, {packet, 0}]) of
@@ -26,10 +23,8 @@ run(set, KeyGen, _ValueGen, State) ->
2623
Msg = io_lib:format("pim.pam.poum.~p ~p ~p~n", [KeyGen(), (Mega * 1000 + Sec), random:uniform(1000)]),
2724
gen_tcp:send(Sock, Msg),
2825
gen_tcp:close(Sock),
29-
ok;
30-
E ->
31-
%error_logger:error_msg("Failed to connect to graphite: ~p", [E]),
32-
E
33-
end,
34-
{ok, State}.
26+
{ok, State};
27+
Error ->
28+
{error, Error, State}
29+
end.
3530

0 commit comments

Comments
 (0)