Classes | Namespaces | Typedefs | Functions | Variables
bm_chttp2_hpack.cc File Reference
#include <string.h>
#include <memory>
#include <sstream>
#include <benchmark/benchmark.h>
#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
#include "src/core/ext/transport/chttp2/transport/hpack_parser.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/timeout_encoding.h"
#include "test/core/util/test_config.h"
#include "test/cpp/microbenchmarks/helpers.h"
#include "test/cpp/util/test_config.h"
Include dependency graph for bm_chttp2_hpack.cc:

Go to the source code of this file.

Classes

class  hpack_parser_fixtures::AddIndexedSingleInternedElem
 
class  hpack_parser_fixtures::AddIndexedSingleStaticElem
 
class  hpack_parser_fixtures::EmptyBatch
 
class  hpack_encoder_fixtures::EmptyBatch
 
class  hpack_parser_fixtures::FromEncoderFixture< EncoderFixture >
 
class  hpack_parser_fixtures::IndexedSingleInternedElem
 
class  hpack_parser_fixtures::IndexedSingleStaticElem
 
class  hpack_parser_fixtures::KeyIndexedSingleInternedElem
 
class  hpack_parser_fixtures::KeyIndexedSingleStaticElem
 
class  hpack_encoder_fixtures::MoreRepresentativeClientInitialMetadata
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< kLength, kTrueBinary >
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< 1, false >
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< 10, false >
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< 100, false >
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< 3, false >
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< 31, false >
 
class  hpack_parser_fixtures::NonIndexedBinaryElem< kLength, true >
 
class  hpack_parser_fixtures::NonIndexedElem
 
class  hpack_encoder_fixtures::RepresentativeClientInitialMetadata
 
class  hpack_encoder_fixtures::RepresentativeServerInitialMetadata
 
class  hpack_encoder_fixtures::RepresentativeServerTrailingMetadata
 
class  hpack_parser_fixtures::SameDeadline
 
class  hpack_encoder_fixtures::SingleBinaryElem< kLength, kTrueBinary >
 
class  hpack_encoder_fixtures::SingleNonBinaryElem
 
class  hpack_encoder_fixtures::SingleStaticElem
 

Namespaces

 benchmark
 
 hpack_encoder_fixtures
 
 hpack_parser_fixtures
 

Typedefs

using hpack_parser_fixtures::MoreRepresentativeClientInitialMetadata = FromEncoderFixture< hpack_encoder_fixtures::MoreRepresentativeClientInitialMetadata >
 
using hpack_parser_fixtures::RepresentativeClientInitialMetadata = FromEncoderFixture< hpack_encoder_fixtures::RepresentativeClientInitialMetadata >
 
using hpack_parser_fixtures::RepresentativeServerInitialMetadata = FromEncoderFixture< hpack_encoder_fixtures::RepresentativeServerInitialMetadata >
 
using hpack_parser_fixtures::RepresentativeServerTrailingMetadata = FromEncoderFixture< hpack_encoder_fixtures::RepresentativeServerTrailingMetadata >
 

Functions

 hpack_encoder_fixtures::Args ({0, 16384})
 
 hpack_encoder_fixtures::Args ({0, 1})
 
 BENCHMARK (BM_HpackEncoderEncodeDeadline)
 
 BENCHMARK (BM_HpackEncoderInitDestroy)
 
 BENCHMARK (BM_HpackParserInitDestroy)
 
 hpack_encoder_fixtures::BENCHMARK_TEMPLATE (BM_HpackEncoderEncodeHeader, EmptyBatch) -> Args(
 
 hpack_encoder_fixtures::BENCHMARK_TEMPLATE (BM_HpackEncoderEncodeHeader, MoreRepresentativeClientInitialMetadata) -> Args(
 
 hpack_encoder_fixtures::BENCHMARK_TEMPLATE (BM_HpackEncoderEncodeHeader, RepresentativeClientInitialMetadata) -> Args(
 
 hpack_encoder_fixtures::BENCHMARK_TEMPLATE (BM_HpackEncoderEncodeHeader, RepresentativeServerInitialMetadata) -> Args(
 
 hpack_encoder_fixtures::BENCHMARK_TEMPLATE (BM_HpackEncoderEncodeHeader, RepresentativeServerTrailingMetadata) -> Args(
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, AddIndexedSingleInternedElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, AddIndexedSingleStaticElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, EmptyBatch)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, IndexedSingleInternedElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, IndexedSingleStaticElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, KeyIndexedSingleInternedElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, KeyIndexedSingleStaticElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 1, false >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 1, true >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 10, false >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 10, true >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 100, false >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 100, true >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 3, false >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 3, true >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 31, false >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedBinaryElem< 31, true >)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, NonIndexedElem)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, RepresentativeClientInitialMetadata)
 
 hpack_parser_fixtures::BENCHMARK_TEMPLATE (BM_HpackParserParseHeader, SameDeadline)
 
static void BM_HpackEncoderEncodeDeadline (benchmark::State &state)
 
template<class Fixture >
static void BM_HpackEncoderEncodeHeader (benchmark::State &state)
 
static void BM_HpackEncoderInitDestroy (benchmark::State &state)
 
static void BM_HpackParserInitDestroy (benchmark::State &state)
 
template<class Fixture >
static void BM_HpackParserParseHeader (benchmark::State &state)
 
static void hpack_encoder_fixtures::CrashOnAppendError (absl::string_view, const grpc_core::Slice &)
 
int main (int argc, char **argv)
 
static grpc_slice MakeSlice (const std::vector< uint8_t > &bytes)
 
void benchmark::RunTheBenchmarksNamespaced ()
 

Variables

static auto * g_memory_allocator
 

Function Documentation

◆ BENCHMARK() [1/3]

◆ BENCHMARK() [2/3]

BENCHMARK ( BM_HpackEncoderInitDestroy  )

◆ BENCHMARK() [3/3]

BENCHMARK ( BM_HpackParserInitDestroy  )

◆ BM_HpackEncoderEncodeDeadline()

static void BM_HpackEncoderEncodeDeadline ( benchmark::State state)
static

Definition at line 73 of file bm_chttp2_hpack.cc.

◆ BM_HpackEncoderEncodeHeader()

template<class Fixture >
static void BM_HpackEncoderEncodeHeader ( benchmark::State state)
static

Definition at line 116 of file bm_chttp2_hpack.cc.

◆ BM_HpackEncoderInitDestroy()

static void BM_HpackEncoderInitDestroy ( benchmark::State state)
static

Definition at line 61 of file bm_chttp2_hpack.cc.

◆ BM_HpackParserInitDestroy()

static void BM_HpackParserInitDestroy ( benchmark::State state)
static

Definition at line 348 of file bm_chttp2_hpack.cc.

◆ BM_HpackParserParseHeader()

template<class Fixture >
static void BM_HpackParserParseHeader ( benchmark::State state)
static

Definition at line 361 of file bm_chttp2_hpack.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 684 of file bm_chttp2_hpack.cc.

◆ MakeSlice()

static grpc_slice MakeSlice ( const std::vector< uint8_t > &  bytes)
static

Definition at line 48 of file bm_chttp2_hpack.cc.

Variable Documentation

◆ g_memory_allocator

auto* g_memory_allocator
static
Initial value:
grpc_core::ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator(
"test"))

Definition at line 44 of file bm_chttp2_hpack.cc.

grpc_event_engine::experimental::MemoryAllocator
Definition: memory_allocator.h:35
grpc_core::ResourceQuota::Default
static ResourceQuotaRefPtr Default()
Definition: resource_quota.cc:27


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:04