-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
39 lines (31 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
PROJECT = erpc
PLT_APPS=ssl crypto public_key
include erlang.mk
test: stop_test_nodes start_test_nodes ct stop_test_nodes
start_test_nodes:
@echo "Starting test node 1..."
@erl -pa ebin -pz test -sname erpc_test_1@localhost -config test/erpc_test_1_sys -s erpc_app start -detached
@echo "Starting test node 2..."
@erl -pa ebin -pz test -sname erpc_test_2@localhost -config test/erpc_test_2_sys -s erpc_app start -detached
stop_test_nodes:
@echo "Stopping any existing test nodes..."
@erl -sname erpc_test_node_killer -noinput +B \
-eval 'rpc:async_call(erpc_test_1@localhost, erlang, halt, []), rpc:async_call(erpc_test_2@localhost, erlang, halt, []), timer:sleep(1000), erlang:halt().'
LOAD_TEST_NUM_WORKERS=20000
LOAD_TEST_NUM_REQS_PER_WORKER=100
erpc_load_test: stop_test_nodes start_test_nodes erpc_load_test_run stop_test_nodes
erpc_load_test_run:
@cd test && erlc run_load_test.erl && cd ..
erl -sname erpc_test_client -pa ebin -pz test -s run_load_test start -- \
-num_workers ${LOAD_TEST_NUM_WORKERS} \
-num_requests_per_worker ${LOAD_TEST_NUM_REQS_PER_WORKER} \
-num_connections_per_node 1 \
-num_erpc_server_nodes 1 \
-rpc_type erpc
rpc_load_test: stop_test_nodes start_test_nodes rpc_load_test_run stop_test_nodes
rpc_load_test_run:
@cd test && erlc run_load_test.erl && cd ..
@erl -sname rpc_test_client -pa ebin -pz test -s run_load_test start -- \
-num_workers ${LOAD_TEST_NUM_WORKERS} \
-num_requests_per_worker ${LOAD_TEST_NUM_REQS_PER_WORKER} \
-rpc_type native