proxygen
proxygen::hpack::TestHeaderCodecStats Class Reference

#include <TestUtil.h>

Inheritance diagram for proxygen::hpack::TestHeaderCodecStats:
proxygen::HeaderCodec::Stats

Public Member Functions

 TestHeaderCodecStats (HeaderCodec::Type type)
 
void recordEncode (HeaderCodec::Type type, HTTPHeaderSize &size) override
 
void recordDecode (HeaderCodec::Type type, HTTPHeaderSize &size) override
 
void recordDecodeError (HeaderCodec::Type type) override
 
void recordDecodeTooLarge (HeaderCodec::Type type) override
 
void reset ()
 
- Public Member Functions inherited from proxygen::HeaderCodec::Stats
 Stats ()
 
virtual ~Stats ()
 

Public Attributes

HeaderCodec::Type type_
 
uint32_t encodes {0}
 
uint32_t encodedBytesCompr {0}
 
uint32_t encodedBytesUncompr {0}
 
uint32_t decodes {0}
 
uint32_t decodedBytesCompr {0}
 
uint32_t decodedBytesUncompr {0}
 
uint32_t errors {0}
 
uint32_t tooLarge {0}
 

Detailed Description

Definition at line 44 of file TestUtil.h.

Constructor & Destructor Documentation

proxygen::hpack::TestHeaderCodecStats::TestHeaderCodecStats ( HeaderCodec::Type  type)
inlineexplicit

Definition at line 47 of file TestUtil.h.

48  : type_(type) {}
PskType type

Member Function Documentation

void proxygen::hpack::TestHeaderCodecStats::recordDecode ( HeaderCodec::Type  type,
HTTPHeaderSize size 
)
inlineoverridevirtual

Implements proxygen::HeaderCodec::Stats.

Definition at line 57 of file TestUtil.h.

References wangle::HTTPHeaderSize::compressed, decodedBytesCompr, decodedBytesUncompr, decodes, EXPECT_EQ, type_, and wangle::HTTPHeaderSize::uncompressed.

57  {
59  decodes++;
60  decodedBytesCompr += size.compressed;
61  decodedBytesUncompr += size.uncompressed;
62  }
PskType type
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
void proxygen::hpack::TestHeaderCodecStats::recordDecodeError ( HeaderCodec::Type  type)
inlineoverridevirtual

Implements proxygen::HeaderCodec::Stats.

Definition at line 64 of file TestUtil.h.

References errors, EXPECT_EQ, and type_.

64  {
66  errors++;
67  }
PskType type
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
void proxygen::hpack::TestHeaderCodecStats::recordDecodeTooLarge ( HeaderCodec::Type  type)
inlineoverridevirtual

Implements proxygen::HeaderCodec::Stats.

Definition at line 69 of file TestUtil.h.

References EXPECT_EQ, tooLarge, and type_.

69  {
71  tooLarge++;
72  }
PskType type
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
void proxygen::hpack::TestHeaderCodecStats::recordEncode ( HeaderCodec::Type  type,
HTTPHeaderSize size 
)
inlineoverridevirtual

Implements proxygen::HeaderCodec::Stats.

Definition at line 50 of file TestUtil.h.

References wangle::HTTPHeaderSize::compressed, encodedBytesCompr, encodedBytesUncompr, encodes, EXPECT_EQ, type_, and wangle::HTTPHeaderSize::uncompressed.

50  {
52  encodes++;
53  encodedBytesCompr += size.compressed;
54  encodedBytesUncompr += size.uncompressed;
55  }
PskType type
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
void proxygen::hpack::TestHeaderCodecStats::reset ( )
inline

Member Data Documentation

uint32_t proxygen::hpack::TestHeaderCodecStats::decodedBytesCompr {0}

Definition at line 90 of file TestUtil.h.

Referenced by recordDecode(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::decodedBytesUncompr {0}

Definition at line 91 of file TestUtil.h.

Referenced by recordDecode(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::decodes {0}

Definition at line 89 of file TestUtil.h.

Referenced by recordDecode(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::encodedBytesCompr {0}

Definition at line 87 of file TestUtil.h.

Referenced by recordEncode(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::encodedBytesUncompr {0}

Definition at line 88 of file TestUtil.h.

Referenced by recordEncode(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::encodes {0}

Definition at line 86 of file TestUtil.h.

Referenced by recordEncode(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::errors {0}

Definition at line 92 of file TestUtil.h.

Referenced by recordDecodeError(), reset(), and TEST_F().

uint32_t proxygen::hpack::TestHeaderCodecStats::tooLarge {0}

Definition at line 93 of file TestUtil.h.

Referenced by recordDecodeTooLarge(), reset(), and TEST_F().

HeaderCodec::Type proxygen::hpack::TestHeaderCodecStats::type_

Definition at line 85 of file TestUtil.h.

Referenced by recordDecode(), recordDecodeError(), recordDecodeTooLarge(), and recordEncode().


The documentation for this class was generated from the following file: