Record path history for the fragment blocking delivery
This commit is contained in:
1 parent
516ed04897
commit
05d3fa30d9
1 file changed
+7
-4
@@ -26,7 +26,7 @@ struct profile { unsigned rtt_ms, kbps; };
|
||||
struct message { uint8_t cmd, from, reserved[2]; uint32_t seq; uint64_t enqueued; uint8_t body[1008]; };
|
||||
struct trace {
|
||||
uint64_t first_tx, first_rx, last_tx, retry_ready;
|
||||
uint32_t attempts;
|
||||
uint32_t attempts, path_history; // последние16 принятых отправок, по2 бита на номер тестового канала
|
||||
uint16_t last_number;
|
||||
uint8_t first_path, last_path;
|
||||
};
|
||||
@@ -42,7 +42,7 @@ struct endpoint {
|
||||
unsigned sent, received;
|
||||
uint64_t bytes, last_delivery, max_gap, max_latency, latency_hist[10001], samples;
|
||||
uint64_t max_latency_enqueued, max_latency_delivered, max_latency_trigger_tx;
|
||||
uint32_t max_latency_msg, max_latency_fragment, max_latency_trigger, max_latency_attempts;
|
||||
uint32_t max_latency_msg, max_latency_fragment, max_latency_trigger, max_latency_attempts, max_latency_paths;
|
||||
};
|
||||
struct path_stats { uint64_t data, retries, rx_unique; };
|
||||
static struct UASYNC* ua;
|
||||
@@ -125,6 +125,7 @@ static void observe_packet(struct ETCP_DGRAM* pkt, struct ETCP_LINK* link, int s
|
||||
if (wait > recovery.ready_wait_us) { recovery.ready_wait_us = wait; recovery.ready_seq = seq; }
|
||||
}
|
||||
if (trace->attempts++ && measuring) traffic[side][path].retries++;
|
||||
trace->path_history = (trace->path_history << 2) | (unsigned)path;
|
||||
if (!trace->first_tx) { trace->first_tx = now; trace->first_path = path; }
|
||||
trace->last_tx = now; trace->last_number = number; trace->last_path = path; trace->retry_ready = 0;
|
||||
if (measuring && fault_start && !side && etcp_tx_rto_us(link) > fault_rto_us[path])
|
||||
@@ -205,6 +206,7 @@ static void receive_message(struct ETCP_CONN* conn, struct ll_entry* entry) {
|
||||
dest->max_latency_enqueued = msg.enqueued; dest->max_latency_delivered = now;
|
||||
struct trace* trigger = &traces[1-side][rx_trigger[side]];
|
||||
dest->max_latency_trigger_tx = trigger->first_tx; dest->max_latency_attempts = trigger->attempts;
|
||||
dest->max_latency_paths = trigger->path_history;
|
||||
}
|
||||
dest->latency_hist[latency / 1000 < 10000 ? latency / 1000 : 10000]++; dest->samples++;
|
||||
}
|
||||
@@ -487,9 +489,10 @@ static void stalled(const struct profile* settings, unsigned count, unsigned bro
|
||||
(unsigned long long)rate, (unsigned long long)capacity, fault_seq,
|
||||
(unsigned long long)(traces[0][fault_seq].first_rx > fault_start ? traces[0][fault_seq].first_rx-fault_start : 0),
|
||||
traces[0][fault_seq].attempts);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "FAULT worst %s message=%u fragment=%u trigger=%u trigger_attempts=%u "
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "FAULT worst %s message=%u fragment=%u trigger=%u trigger_attempts=%u paths_2bit=%08x "
|
||||
"enqueued_us=%lld delivered_us=%lld trigger_first_tx_us=%lld latency_us=%llu", case_name,
|
||||
ep[1].max_latency_msg, ep[1].max_latency_fragment, ep[1].max_latency_trigger, ep[1].max_latency_attempts,
|
||||
ep[1].max_latency_msg, ep[1].max_latency_fragment, ep[1].max_latency_trigger,
|
||||
ep[1].max_latency_attempts, ep[1].max_latency_paths,
|
||||
(long long)((int64_t)ep[1].max_latency_enqueued - (int64_t)fault_start),
|
||||
(long long)((int64_t)ep[1].max_latency_delivered - (int64_t)fault_start),
|
||||
(long long)((int64_t)ep[1].max_latency_trigger_tx - (int64_t)fault_start), (unsigned long long)ep[1].max_latency);
|
||||
|
||||
Reference in new issue
Block a user