diff --git a/tests/performances_tests.py b/tests/performances_tests.py new file mode 100644 index 0000000000000000000000000000000000000000..92b09e9b858ca3e17992a17a2f7399d105196e57 --- /dev/null +++ b/tests/performances_tests.py @@ -0,0 +1,23 @@ + +""" +Return a dictionary of the different values found in the receiver stats (.csv) file +""" +def read_receiver_stats(filename): + dictionary = {} + with open(filename, 'r') as f: + for line in f.readlines(): + key, value = line.split(":") + dictionary[key] = int(value) + return dictionary + +""" +Return a dictionary of the different values found in the sender stats (.csv) file +""" +def read_sender_stats(filename): + dictionary = {} + with open(filename, 'r') as f: + for line in f.readlines(): + key, value = line.split(":") + dictionary[key] = int(value) + return dictionary + diff --git a/tests/performances_tests.sh b/tests/performances_tests.sh new file mode 100644 index 0000000000000000000000000000000000000000..e13371856e44ad86e2b3e9486af8dadbd01f875d --- /dev/null +++ b/tests/performances_tests.sh @@ -0,0 +1,16 @@ +#!/bin/bash + + +# File use for the test of performance +file_to_transfer='tests_files/smile.png' + +# Chosen parameters for the test of performance +ERROR_RATE=20 +CUT_RATE=30 +DELAY=0 +JITTER=0 +LOSS_RATE=25 + +if [ ! -d "tests_logs/performance_tests/" ]; then + mkdir 'tests_logs/performance_tests/' +fi