mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-08-14 01:16:10 -04:00
Improved latency and reliability testing
This commit is contained in:
parent
b6d6c8127a
commit
1a594d0d6f
46 changed files with 995 additions and 314 deletions
|
@ -3110,9 +3110,29 @@
|
|||
"description": "fastest latency in the ROLLING_LATENCIES_SIZE last latencies",
|
||||
"type": "string"
|
||||
},
|
||||
"p75": {
|
||||
"description": "p75 latency in the ROLLING_LATENCIES_SIZE",
|
||||
"default": "0",
|
||||
"type": "string"
|
||||
},
|
||||
"p90": {
|
||||
"description": "p90 latency in the ROLLING_LATENCIES_SIZE",
|
||||
"default": "0",
|
||||
"type": "string"
|
||||
},
|
||||
"slowest": {
|
||||
"description": "slowest latency in the ROLLING_LATENCIES_SIZE last latencies",
|
||||
"type": "string"
|
||||
},
|
||||
"tm75": {
|
||||
"description": "trimmed mean with lowest 75% latency in the ROLLING_LATENCIES_SIZE",
|
||||
"default": "0",
|
||||
"type": "string"
|
||||
},
|
||||
"tm90": {
|
||||
"description": "trimmed mean with lowest 90% latency in the ROLLING_LATENCIES_SIZE",
|
||||
"default": "0",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3153,7 +3173,19 @@
|
|||
"rpc_stats": {
|
||||
"description": "information about RPCs",
|
||||
"default": {
|
||||
"answer": {
|
||||
"answer_ordered": {
|
||||
"answers": 0,
|
||||
"consecutive_answers_average": 0,
|
||||
"consecutive_answers_maximum": 0,
|
||||
"consecutive_answers_minimum": 0,
|
||||
"consecutive_lost_answers_average": 0,
|
||||
"consecutive_lost_answers_maximum": 0,
|
||||
"consecutive_lost_answers_minimum": 0,
|
||||
"lost_answers": 0,
|
||||
"questions": 0,
|
||||
"span": "0"
|
||||
},
|
||||
"answer_unordered": {
|
||||
"answers": 0,
|
||||
"consecutive_answers_average": 0,
|
||||
"consecutive_answers_maximum": 0,
|
||||
|
@ -3172,7 +3204,8 @@
|
|||
"messages_rcvd": 0,
|
||||
"messages_sent": 0,
|
||||
"questions_in_flight": 0,
|
||||
"recent_lost_answers": 0
|
||||
"recent_lost_answers_ordered": 0,
|
||||
"recent_lost_answers_unordered": 0
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
@ -3269,12 +3302,31 @@
|
|||
"failed_to_send",
|
||||
"messages_rcvd",
|
||||
"messages_sent",
|
||||
"questions_in_flight",
|
||||
"recent_lost_answers"
|
||||
"questions_in_flight"
|
||||
],
|
||||
"properties": {
|
||||
"answer": {
|
||||
"description": "rpc answer stats for this peer",
|
||||
"answer_ordered": {
|
||||
"description": "ordered rpc answer stats for this peer",
|
||||
"default": {
|
||||
"answers": 0,
|
||||
"consecutive_answers_average": 0,
|
||||
"consecutive_answers_maximum": 0,
|
||||
"consecutive_answers_minimum": 0,
|
||||
"consecutive_lost_answers_average": 0,
|
||||
"consecutive_lost_answers_maximum": 0,
|
||||
"consecutive_lost_answers_minimum": 0,
|
||||
"lost_answers": 0,
|
||||
"questions": 0,
|
||||
"span": "0"
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AnswerStats"
|
||||
}
|
||||
]
|
||||
},
|
||||
"answer_unordered": {
|
||||
"description": "unordered rpc answer stats for this peer",
|
||||
"default": {
|
||||
"answers": 0,
|
||||
"consecutive_answers_average": 0,
|
||||
|
@ -3338,8 +3390,16 @@
|
|||
"format": "uint32",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"recent_lost_answers": {
|
||||
"description": "number of answers that have been lost consecutively",
|
||||
"recent_lost_answers_ordered": {
|
||||
"description": "number of answers that have been lost consecutively over an ordered channel",
|
||||
"default": 0,
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"recent_lost_answers_unordered": {
|
||||
"description": "number of answers that have been lost consecutively over an unordered channel",
|
||||
"default": 0,
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0.0
|
||||
|
|
|
@ -121,9 +121,11 @@ class RPCStats:
|
|||
last_question_ts: Optional[Timestamp]
|
||||
last_seen_ts: Optional[Timestamp]
|
||||
first_consecutive_seen_ts: Optional[Timestamp]
|
||||
recent_lost_answers: int
|
||||
recent_lost_answers_unordered: int
|
||||
recent_lost_answers_ordered: int
|
||||
failed_to_send: int
|
||||
answer: AnswerStats
|
||||
answer_unordered: AnswerStats
|
||||
answer_ordered: AnswerStats
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -133,9 +135,11 @@ class RPCStats:
|
|||
last_question_ts: Optional[Timestamp],
|
||||
last_seen_ts: Optional[Timestamp],
|
||||
first_consecutive_seen_ts: Optional[Timestamp],
|
||||
recent_lost_answers: int,
|
||||
recent_lost_answers_unordered: int,
|
||||
recent_lost_answers_ordered: int,
|
||||
failed_to_send: int,
|
||||
answer: AnswerStats,
|
||||
answer_unordered: AnswerStats,
|
||||
answer_ordered: AnswerStats,
|
||||
):
|
||||
self.messages_sent = messages_sent
|
||||
self.messages_rcvd = messages_rcvd
|
||||
|
@ -143,9 +147,11 @@ class RPCStats:
|
|||
self.last_question_ts = last_question_ts
|
||||
self.last_seen_ts = last_seen_ts
|
||||
self.first_consecutive_seen_ts = first_consecutive_seen_ts
|
||||
self.recent_lost_answers = recent_lost_answers
|
||||
self.recent_lost_answers_unordered = recent_lost_answers_unordered
|
||||
self.recent_lost_answers_ordered = recent_lost_answers_ordered
|
||||
self.failed_to_send = failed_to_send
|
||||
self.answer = answer
|
||||
self.answer_unordered = answer_unordered
|
||||
self.answer_ordered = answer_ordered
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, j: dict) -> Self:
|
||||
|
@ -159,9 +165,11 @@ class RPCStats:
|
|||
None
|
||||
if j["first_consecutive_seen_ts"] is None
|
||||
else Timestamp(j["first_consecutive_seen_ts"]),
|
||||
j["recent_lost_answers"],
|
||||
j["recent_lost_answers_unordered"],
|
||||
j["recent_lost_answers_ordered"],
|
||||
j["failed_to_send"],
|
||||
AnswerStats.from_json(j["answer"]),
|
||||
AnswerStats.from_json(j["answer_unordered"]),
|
||||
AnswerStats.from_json(j["answer_ordered"]),
|
||||
)
|
||||
|
||||
|
||||
|
@ -169,16 +177,28 @@ class LatencyStats:
|
|||
fastest: TimestampDuration
|
||||
average: TimestampDuration
|
||||
slowest: TimestampDuration
|
||||
tm90: TimestampDuration
|
||||
tm75: TimestampDuration
|
||||
p90: TimestampDuration
|
||||
p75: TimestampDuration
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
fastest: TimestampDuration,
|
||||
average: TimestampDuration,
|
||||
slowest: TimestampDuration,
|
||||
tm90: TimestampDuration,
|
||||
tm75: TimestampDuration,
|
||||
p90: TimestampDuration,
|
||||
p75: TimestampDuration,
|
||||
):
|
||||
self.fastest = fastest
|
||||
self.average = average
|
||||
self.slowest = slowest
|
||||
self.tm90 = tm90
|
||||
self.tm75 = tm75
|
||||
self.p90 = p90
|
||||
self.p75 = p75
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, j: dict) -> Self:
|
||||
|
@ -187,6 +207,10 @@ class LatencyStats:
|
|||
TimestampDuration(j["fastest"]),
|
||||
TimestampDuration(j["average"]),
|
||||
TimestampDuration(j["slowest"]),
|
||||
TimestampDuration(j["tm90"]),
|
||||
TimestampDuration(j["tm75"]),
|
||||
TimestampDuration(j["p90"]),
|
||||
TimestampDuration(j["p75"]),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue