proxygen
ByteEvents.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
11 
13 
14 namespace proxygen {
15 
16 const char* const kTypeStrings[] = {
17  "FIRST_BYTE",
18  "LAST_BYTE",
19  "PING_REPLY_SENT",
20  "FIRST_HEADER_BYTE",
21 };
22 
23 std::ostream& operator<<(std::ostream& os, const ByteEvent& be) {
24  os << folly::to<std::string>(
25  "(", kTypeStrings[be.eventType_], ", ", be.byteOffset_, ")");
26  return os;
27 }
28 
31 }
32 
33 } // proxygen
std::ostream & operator<<(std::ostream &os, const HeaderTable &table)
EventType eventType_
Definition: ByteEvents.h:36
int64_t getLatency() override
Definition: ByteEvents.cpp:29
uint64_t byteOffset_
Definition: ByteEvents.h:38
TimePoint pingRequestReceivedTime_
Definition: ByteEvents.h:108
std::chrono::milliseconds millisecondsSince(std::chrono::time_point< ClockType > t)
Definition: Time.h:101
const char *const kTypeStrings[]
Definition: ByteEvents.cpp:16