summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaokun <[email protected]>2024-09-09 18:22:44 +0800
committerzhaokun <[email protected]>2024-09-09 18:22:44 +0800
commit3c08a64a1c511ce0d4e0d8e0fa8ccdb863ddf1da (patch)
treea591d9f41741dc667bd849e3e3d70851b4d3d79c
parent751b2338e4966b76f9a9bf06570f3f32a84d46f6 (diff)
add session count
-rw-r--r--trex_replay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/trex_replay.py b/trex_replay.py
index f80fcbc..9a0b3b4 100644
--- a/trex_replay.py
+++ b/trex_replay.py
@@ -77,14 +77,15 @@ class TrafficReplay:
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), str(datetime.now().microsecond)[:3], f"Replay packet {sum_count} time, replay cps: {m}, replay duration: {d}. The expected statistical results are as follows: ", flush=True)
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), str(datetime.now().microsecond)[:3], f"Actual replay packet {open_flows} time", flush=True)
metric_info_dict = {key:(value*open_flows) for key, value in pcap_info_dict.items()}
+ metric_info_dict["session"] = open_flows
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), str(datetime.now().microsecond)[:3], metric_info_dict, flush=True)
return metric_info_dict
if __name__ == '__main__':
clients_start = "10.64.77.1"
clients_end = "10.64.77.1"
- servers_start = "21.79.150.11"
- servers_end = "21.79.150.11"
+ servers_start = "1.1.1.1"
+ servers_end = "1.1.1.1"
servers_end = servers_start
clients_end = clients_start
m = 1