mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
HTTP Priority update logging in QLog
Summary: as title Reviewed By: mjoras Differential Revision: D24903759 fbshipit-source-id: 39127b658e6cb06025272c1c5ab0f7de2ae1a54a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
218873a107
commit
7c85871c3e
@@ -839,6 +839,28 @@ folly::dynamic QLogPathValidationEvent::toDynamic() const {
|
||||
return d;
|
||||
}
|
||||
|
||||
QLogPriorityUpdateEvent::QLogPriorityUpdateEvent(
|
||||
StreamId streamId,
|
||||
uint8_t urgency,
|
||||
bool incremental,
|
||||
std::chrono::microseconds refTimeIn)
|
||||
: streamId_(streamId), urgency_(urgency), incremental_(incremental) {
|
||||
eventType = QLogEventType::PriorityUpdate;
|
||||
refTime = refTimeIn;
|
||||
}
|
||||
|
||||
folly::dynamic QLogPriorityUpdateEvent::toDynamic() const {
|
||||
folly::dynamic d = folly::dynamic::array(
|
||||
folly::to<std::string>(refTime.count()), "HTTP3", toString(eventType));
|
||||
folly::dynamic data = folly::dynamic::object();
|
||||
|
||||
data["id"] = streamId_;
|
||||
data["urgency"] = urgency_;
|
||||
data["incremental"] = incremental_;
|
||||
d.push_back(std::move(data));
|
||||
return d;
|
||||
}
|
||||
|
||||
folly::StringPiece toString(QLogEventType type) {
|
||||
switch (type) {
|
||||
case QLogEventType::PacketSent:
|
||||
@@ -883,6 +905,8 @@ folly::StringPiece toString(QLogEventType type) {
|
||||
return "connection_migration";
|
||||
case QLogEventType::PathValidation:
|
||||
return "path_validation";
|
||||
case QLogEventType::PriorityUpdate:
|
||||
return "priority";
|
||||
}
|
||||
folly::assume_unreachable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user