proxygen
CompressionTypes.h
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  */
10 #pragma once
11 
12 #include <chrono>
13 
14 namespace proxygen { namespace compress {
15 enum class SchemeType { QPACK, QMIN, HPACK };
16 
17 // Metadata about encoded blocks. In a real stack, these might be
18 // conveyed via HTTP frame (HEADERS or PUSH_PROMISE) flags.
19 struct FrameFlags {
20  FrameFlags(bool ooo = false, bool depends = false)
21  : allowOOO(ooo), QPACKPrefixHasDepends(depends) {
22  }
23 
24  bool allowOOO{false};
25  bool QPACKPrefixHasDepends{false};
26 };
27 
28 struct SimParams {
31  std::chrono::milliseconds rtt;
34  std::chrono::milliseconds maxDelay;
36  bool blend;
40 };
41 
42 struct SimStats {
43  uint64_t allowedOOO{0};
44  uint64_t packetLosses{0};
45  uint64_t maxQueueBufferBytes{0};
46  std::chrono::milliseconds holDelay{0};
47  uint64_t uncompressed{0};
48  uint64_t compressed{0};
49  uint64_t packets{0};
50 };
51 }} // namespace proxygen::compress
std::chrono::milliseconds maxDelay
FrameFlags(bool ooo=false, bool depends=false)
std::chrono::milliseconds rtt