Skip to content
Snippets Groups Projects
Commit 772fef41 authored by Jono Wenger's avatar Jono Wenger
Browse files

Merge branch 'release' of gitlab.com:elixxir/integration into feature/dnf/GroupChat

parents eabfc2b5 82472c70
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ cache: ...@@ -17,7 +17,7 @@ cache:
variables: variables:
REPO_DIR: gitlab.com/elixxir REPO_DIR: gitlab.com/elixxir
REPO_NAME: server REPO_NAME: server
DOCKER_IMAGE: elixxirlabs/cuda-go:go1.13-cuda11.1 DOCKER_IMAGE: elixxirlabs/cuda-go:go1.16-cuda11.1
# See https://docs.gitlab.com/ee/api/jobs.html#download-a-single-artifact-file-from-specific-tag-or-branch # See https://docs.gitlab.com/ee/api/jobs.html#download-a-single-artifact-file-from-specific-tag-or-branch
REPOS_API: https://gitlab.com/api/v4/projects/elixxir%2F REPOS_API: https://gitlab.com/api/v4/projects/elixxir%2F
SERVER_URL: "" SERVER_URL: ""
......
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Received 10
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Sent: Hello from 20, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Message received: Hello from 21, without E2E Encryption
Received 10
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Received 10
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Sent: Hello from 21, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Message received: Hello from 20, without E2E Encryption
Received 10
#!/usr/bin/env python3 #!/usr/bin/env python3
# This script is used for building reports on dropped E2E integration tests # This script is used for building reports on message sending for E2E integration tests
import logging
import re import re
import glob import glob
import os import os
import logging as log import logging as log
import datetime
import statistics
resultsDir = "./results/clients" resultsDir = "./results/clients"
...@@ -28,19 +28,6 @@ def find_files(): ...@@ -28,19 +28,6 @@ def find_files():
return glob.glob('{}/client*.log'.format(resultsDir)) return glob.glob('{}/client*.log'.format(resultsDir))
def read_file(path, phrases):
"""Reads the lines of a file."""
while 1:
with open(path, 'r') as file:
line = file.readline()
if not line:
break
else:
for phrase in phrases:
if phrase in line:
yield line
def main(): def main():
log.basicConfig(format='[%(levelname)s] %(asctime)s: %(message)s', log.basicConfig(format='[%(levelname)s] %(asctime)s: %(message)s',
level=log.INFO, datefmt='%d-%b-%y %H:%M:%S') level=log.INFO, datefmt='%d-%b-%y %H:%M:%S')
...@@ -65,6 +52,15 @@ def main(): ...@@ -65,6 +52,15 @@ def main():
log.debug("Located sent message: {}".format(sent_message)) log.debug("Located sent message: {}".format(sent_message))
messages_sent[sent_message] = {"sender": os.path.basename(path)} messages_sent[sent_message] = {"sender": os.path.basename(path)}
# Capture message timestamp
sent_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
try:
sent_timestamp = datetime.datetime.strptime(sent_timestamp_str, '%Y/%m/%d %H:%M:%S.%f')
except ValueError:
sent_timestamp = datetime.datetime.strptime(sent_timestamp_str, '%Y/%m/%d %H:%M:%S')
log.debug("Located sent timestamp: {}".format(sent_timestamp))
messages_sent[sent_message]["sent"] = sent_timestamp
# Capture rounds messages were sent in # Capture rounds messages were sent in
sent_round = re.findall('\) in round ([0-9]+)', line)[0] sent_round = re.findall('\) in round ([0-9]+)', line)[0]
log.debug("Located sent round: {}".format(sent_round)) log.debug("Located sent round: {}".format(sent_round))
...@@ -72,12 +68,21 @@ def main(): ...@@ -72,12 +68,21 @@ def main():
if sent_round not in rounds_sent: if sent_round not in rounds_sent:
rounds_sent[sent_round] = False rounds_sent[sent_round] = False
elif "Received message of type" in line: elif "Received message of type" in line or "Received AuthRequest from" in line or "Received AuthConfirm from" in line:
# Capture message receiving # Capture message receiving
received_messages = re.findall(' msgDigest: (.{20})', line) received_message = re.findall(' msgDigest: (.{20})', line)[0]
for received_message in received_messages: log.debug("Located received message: {}".format(received_message))
log.debug("Located received message: {}".format(received_message)) messages_received[received_message] = {"receiver": os.path.basename(path)}
messages_received[received_message] = os.path.basename(path)
# Capture message timestamp
received_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
try:
received_timestamp = datetime.datetime.strptime(received_timestamp_str,
'%Y/%m/%d %H:%M:%S.%f')
except ValueError:
received_timestamp = datetime.datetime.strptime(received_timestamp_str, '%Y/%m/%d %H:%M:%S')
log.debug("Located received timestamp: {}".format(received_timestamp))
messages_received[received_message]["received"] = received_timestamp
elif "Round(s)" in line: elif "Round(s)" in line:
# Capture round success # Capture round success
...@@ -87,13 +92,22 @@ def main(): ...@@ -87,13 +92,22 @@ def main():
rounds_sent[successful_round] = True rounds_sent[successful_round] = True
# Print results # Print results
num_successful = 0 num_successful = 0 # Keep track of how many messages were received successfully
total_latency = datetime.timedelta() # Keep track of the total message latencies to calculate a mean
latencies = [] # Keep track of each message's latency in order to calculate a median
for msgDigest, senderDict in messages_sent.items(): for msgDigest, senderDict in messages_sent.items():
if msgDigest in messages_received: if msgDigest in messages_received:
log.debug("Message {} sent by {} on round {} was received".format(msgDigest,
senderDict["sender"],
senderDict["round"]))
num_successful += 1 num_successful += 1
time_sent = messages_sent[msgDigest]["sent"]
time_received = messages_received[msgDigest]["received"]
message_latency = time_received - time_sent
latencies.append(message_latency)
total_latency += message_latency
log.info("Message {} sent by {} on round {} was received after {}".format(msgDigest,
senderDict["sender"],
senderDict["round"],
message_latency))
log.info("\tSent: {}, Received: {}".format(time_sent, time_received))
else: else:
log.error("Message {} sent by {} on round {} was NOT received".format(msgDigest, log.error("Message {} sent by {} on round {} was NOT received".format(msgDigest,
senderDict["sender"], senderDict["sender"],
...@@ -105,6 +119,7 @@ def main(): ...@@ -105,6 +119,7 @@ def main():
log.warning("Round {} was NOT confirmed successful, messages may have been dropped".format(round_id)) log.warning("Round {} was NOT confirmed successful, messages may have been dropped".format(round_id))
log.info("{}/{} messages received successfully!".format(num_successful, len(messages_sent))) log.info("{}/{} messages received successfully!".format(num_successful, len(messages_sent)))
log.info("\tMean: {}, Median: {}".format(total_latency / num_successful, statistics.median(latencies)))
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -271,6 +271,19 @@ then ...@@ -271,6 +271,19 @@ then
wait $PIDVAL wait $PIDVAL
wait $PIDVAL2 wait $PIDVAL2
echo "FORCING MESSAGE PICKUP RETRY... (NON-E2E, PRECAN)"
CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS --forceMessagePickupRetry --unsafe -l $CLIENTOUT/client20.log -s blob20 --sendid 20 --destid 21 --sendCount 10 --receiveCount 10 -m \"Hello from 20, without E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client20.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS --forceMessagePickupRetry --unsafe -l $CLIENTOUT/client21.log -s blob21 --sendid 21 --destid 20 --sendCount 10 --receiveCount 10 -m \"Hello from 21, without E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client21.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
fi fi
# Non-precanned E2E user messaging # Non-precanned E2E user messaging
...@@ -389,6 +402,18 @@ echo "$CLIENTCMD -- $PIDVAL" ...@@ -389,6 +402,18 @@ echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL wait $PIDVAL
wait $PIDVAL2 wait $PIDVAL2
echo "FORCING MESSAGE PICKUP RETRY... "
CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS --forceMessagePickupRetry -l $CLIENTOUT/client20.log -s blob20 --sendid 20 --destid 21 --sendCount 10 --receiveCount 10 -m \"Hello from 20, without E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client20.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS --forceMessagePickupRetry -l $CLIENTOUT/client21.log -s blob21 --sendid 21 --destid 20 --sendCount 10 --receiveCount 10 -m \"Hello from 21, without E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client21.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
# Single-use test: client53 sends message to client52; client52 responds with # Single-use test: client53 sends message to client52; client52 responds with
# the same message in the set number of message parts # the same message in the set number of message parts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment