diff options
Diffstat (limited to 'moonv4/tests/02_smpolicy_chaining_overhead')
4 files changed, 46 insertions, 21 deletions
diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh b/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh index 3a10ef4a..ffe59457 100644 --- a/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh +++ b/moonv4/tests/02_smpolicy_chaining_overhead/exec.sh @@ -1,22 +1,45 @@ #!/usr/bin/env bash -TEST_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/set_authz.py +HOST_MASTER=varuna +PORT_MASTER=38001 +HOST_SLAVE=172.18.0.11 +PORT_SLAVE=38001 + +TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py" POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py -RESULT_DIR=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/10_users_rbac -SCENARIO_RBAC=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/rbac_10.py -SCENARIO_SESSION=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/session.py + +RESULT_DIR=${MOON_HOME}/tests/02_smpolicy_chaining_overhead/${HOST_MASTER} +ARGS="--limit=100 -t"; mkdir -p ${RESULT_DIR} 2>/dev/null -python3 ${POPULATE_SCRIPT} ${SCENARIO_RBAC} -# python3 ${POPULATE_SCRIPT} ${SCENARIO_SESSION} - -python3 ${TEST_SCRIPT} --request-per-second 1 --write="${RESULT_DIR}/data_1.json" --write-html="${RESULT_DIR}/data_1.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 2 --write="${RESULT_DIR}/data_2.json" --write-html="${RESULT_DIR}/data_2.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 3 --write="${RESULT_DIR}/data_3.json" --write-html="${RESULT_DIR}/data_3.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 4 --write="${RESULT_DIR}/data_4.json" --write-html="${RESULT_DIR}/data_4.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 5 --write="${RESULT_DIR}/data_5.json" --write-html="${RESULT_DIR}/data_5.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 10 --write="${RESULT_DIR}/data_10.json" --write-html="${RESULT_DIR}/data_10.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 15 --write="${RESULT_DIR}/data_15.json" --write-html="${RESULT_DIR}/data_15.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 20 --write="${RESULT_DIR}/data_20.json" --write-html="${RESULT_DIR}/data_20.html" ${SCENARIO_RBAC} -python3 ${TEST_SCRIPT} --request-per-second 25 --write="${RESULT_DIR}/data_25.json" --write-html="${RESULT_DIR}/data_25.html" ${SCENARIO_RBAC} +CPT="01 02 03 04 05 06 07 08 09 10" + +SC=rbac_10.py +python3 ${POPULATE_SCRIPT} ${SC} + +#for REQ in 01 02 03 04 05 06 07 08 09 10; +#do + +python3 ${TEST_SCRIPT} --host=${HOST_MASTER} --port=${PORT_SLAVE} ${ARGS} \ + --pdp pdp01 --request-per-second 5 --write="${RESULT_DIR}/data_rbac_05_01.json" ${SC} + +#done + +echo Press enter to continue +read A + +SC=session_10.py +python3 ${POPULATE_SCRIPT} ${SC} + +#for REQ in 01 02 03 04 05 06 07 08 09 10; +#do + +echo Press enter to continue +read A + +python3 ${TEST_SCRIPT} --host=${HOST_MASTER} --port=${PORT_SLAVE} ${ARGS} \ + --pdp pdp01 --request-per-second 5 --write="${RESULT_DIR}/data_rbac_session_05_01.json" ${SC} + +#done + diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh b/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh index e67babce..b92b82ba 100644 --- a/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh +++ b/moonv4/tests/02_smpolicy_chaining_overhead/plot.sh @@ -4,10 +4,12 @@ DIR=$1 cd ${DIR} +python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py --help + python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \ - --input="data_1.json,data_2.json,data_3.json,data_4.json,data_5.json,data_10.json,data_15.json,data_20.json" \ - --legend="1 req/s,2 req/s,3 req/s,4 req/s,5 req/s,10 req/s,15 req/s,20 req/s" \ - --plot-result="Deny" \ + --input="data_1.json,data_2.json,data_3.json,data_4.json,data_5.json,data_6.json,data_7.json,data_8.json,data_9.json,data_10.json,data_11.json,data_12.json,data_13.json,data_14.json,data_15.json,data_16.json,data_17.json,data_18.json,data_19.json,data_20.json,data_21.json,data_22.json,data_23.json,data_24.json,data_25.json,data_26.json,data_27.json,data_28.json,data_29.json,data_30.json" \ + --legend="1 req/s,2 req/s,3 req/s,4 req/s,5 req/s,6 req/s,7 req/s,8 req/s,9 req/s,10 req/s,11 req/s,12 req/s,13 req/s,14 req/s,15 req/s,16 req/s,17 req/s,18 req/s,19 req/s,20 req/s,21 req/s,22 req/s,23 req/s,24 req/s,25 req/s,26 req/s,27 req/s,28 req/s,29 req/s,30 req/s" \ + --plot-result="*" \ --plot-average \ -d #python3 ${MOON_HOME}/moon_interface/tests/apitests/plot_json.py \ diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py b/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py index ef5dd9b2..60699cc6 100644 --- a/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py +++ b/moonv4/tests/02_smpolicy_chaining_overhead/rbac_10.py @@ -1,5 +1,5 @@ -pdp_name = "pdp1" +pdp_name = "pdp01" policy_name = "RBAC policy example" model_name = "RBAC" policy_genre = "authz" diff --git a/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py b/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py index 5b4a64b6..d247ff19 100644 --- a/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py +++ b/moonv4/tests/02_smpolicy_chaining_overhead/session_10.py @@ -1,5 +1,5 @@ -pdp_name = "pdp1" +pdp_name = "pdp01" policy_name = "Session policy example" model_name = "Session" policy_genre = "session" |