From be6066e97974beebc434486d3c116e4112abc482 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 23 Jul 2021 15:14:30 +0200 Subject: [PATCH] Cleaning up test script --- scripts/stream_throughput.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/stream_throughput.py b/scripts/stream_throughput.py index 2e2b33c..4ba58bb 100644 --- a/scripts/stream_throughput.py +++ b/scripts/stream_throughput.py @@ -4,6 +4,7 @@ Author: Ryan Summers Description: Provides a mechanism for measuring Stabilizer stream data throughput. """ +import argparse import socket import collections import struct @@ -93,9 +94,10 @@ class PacketParser: def _parse(self): """ Attempt to parse packets from the received buffer. """ # Attempt to parse a block from the buffer. - if len(self.buf) < 4: + if len(self.buf) < 7: return None + # Parse out the packet header start_id, format_id, batch_count, batch_size = struct.unpack_from('