save msg_id in the latency csv file (for responsiveness calculation later)

This commit is contained in:
Youngjoon Lee 2024-08-22 22:35:13 +02:00
parent e256d3a744
commit efee24d95f
No known key found for this signature in database
GPG Key ID: 167546E2D1712F8C

View File

@ -336,12 +336,13 @@ fn save_latencies(
) {
let mut writer = csv::Writer::from_path(path).unwrap();
writer
.write_record(["latency", "sent_time", "received_time"])
.write_record(["msg_id", "latency", "sent_time", "received_time"])
.unwrap();
for (msg, latency) in latencies.iter() {
let sent_time = sent_times.get(msg).unwrap();
writer
.write_record(&[
msg.to_string(),
latency.to_string(),
sent_time.to_string(),
(sent_time + latency).to_string(),