Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
bm_call_create.cc File Reference
#include <string.h>
#include <sstream>
#include <benchmark/benchmark.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include <grpcpp/channel.h>
#include <grpcpp/support/channel_arguments.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/deadline/deadline_filter.h"
#include "src/core/ext/filters/http/client/http_client_filter.h"
#include "src/core/ext/filters/http/message_compress/message_compress_filter.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/filters/message_size/message_size_filter.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_stack_builder_impl.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/iomgr/call_combiner.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/transport/transport_impl.h"
#include "src/cpp/client/create_channel_internal.h"
#include "src/proto/grpc/testing/echo.grpc.pb.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_call_create.cc:

Go to the source code of this file.

Classes

class  BaseChannelFixture
 
struct  isolated_call_filter::call_data
 
class  FakeClientChannelFactory
 
class  Fixture< kFilter, kFlags >
 
class  InsecureChannel
 
class  IsolatedCallFixture
 
class  LameChannel
 
class  NoOp
 
class  SendEmptyMetadata::Op
 
class  NoOp::Op
 
class  SendEmptyMetadata
 

Namespaces

 benchmark
 
 isolated_call_filter
 
 phony_filter
 
 phony_transport
 

Typedefs

typedef Fixture<&grpc_core::ClientChannel::kFilterVtable, 0 > ClientChannelFilter
 
typedef Fixture<&grpc_client_deadline_filter, CHECKS_NOT_LASTClientDeadlineFilter
 
typedef Fixture<&grpc_message_compress_filter, CHECKS_NOT_LASTCompressFilter
 
typedef Fixture<&grpc_core::HttpClientFilter::kFilter, CHECKS_NOT_LAST|REQUIRES_TRANSPORTHttpClientFilter
 
typedef Fixture<&grpc_core::HttpServerFilter::kFilter, CHECKS_NOT_LASTHttpServerFilter
 
typedef Fixture<&grpc_message_size_filter, CHECKS_NOT_LASTMessageSizeFilter
 
typedef Fixture< nullptr, 0 > NoFilter
 
typedef Fixture<&phony_filter::phony_filter, 0 > PhonyFilter
 
typedef Fixture<&grpc_server_deadline_filter, CHECKS_NOT_LASTServerDeadlineFilter
 

Enumerations

enum  FixtureFlags : uint32_t { CHECKS_NOT_LAST = 1, REQUIRES_TRANSPORT = 2 }
 

Functions

grpc_arg phony_transport::Arg ()
 
 Arg (64) -> Arg(128) ->Arg(256) ->Arg(512) ->Arg(1024) ->Arg(1536) ->Arg(2048) ->Arg(3072) ->Arg(4096) ->Arg(5120) ->Arg(6144) ->Arg(7168)
 
 BENCHMARK (BM_IsolatedCall_NoOp)
 
 BENCHMARK (BM_IsolatedCall_StreamingSend)
 
 BENCHMARK (BM_IsolatedCall_Unary)
 
 BENCHMARK (BM_LameChannelCallCreateCore)
 
 BENCHMARK (BM_LameChannelCallCreateCoreSeparateBatch)
 
 BENCHMARK (BM_LameChannelCallCreateCpp)
 
 BENCHMARK_TEMPLATE (BM_CallCreateDestroy, InsecureChannel)
 
 BENCHMARK_TEMPLATE (BM_CallCreateDestroy, LameChannel)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, ClientDeadlineFilter, NoOp)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, ClientDeadlineFilter, SendEmptyMetadata)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, CompressFilter, NoOp)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, CompressFilter, SendEmptyMetadata)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, MessageSizeFilter, NoOp)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, MessageSizeFilter, SendEmptyMetadata)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, NoFilter, NoOp)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, PhonyFilter, NoOp)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, PhonyFilter, SendEmptyMetadata)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, ServerDeadlineFilter, NoOp)
 
 BENCHMARK_TEMPLATE (BM_IsolatedFilter, ServerDeadlineFilter, SendEmptyMetadata)
 
template<class Fixture >
static void BM_CallCreateDestroy (benchmark::State &state)
 
static void BM_IsolatedCall_NoOp (benchmark::State &state)
 
static void BM_IsolatedCall_StreamingSend (benchmark::State &state)
 
static void BM_IsolatedCall_Unary (benchmark::State &state)
 
template<class Fixture , class TestOp >
static void BM_IsolatedFilter (benchmark::State &state)
 
static void BM_LameChannelCallCreateCore (benchmark::State &state)
 
static void BM_LameChannelCallCreateCoreSeparateBatch (benchmark::State &state)
 
static void BM_LameChannelCallCreateCpp (benchmark::State &state)
 
void BM_Zalloc (benchmark::State &state)
 
static grpc_channelCreateChannel ()
 
void phony_transport::Destroy (grpc_transport *)
 
static void phony_filter::DestroyCallElem (grpc_call_element *, const grpc_call_final_info *, grpc_closure *)
 
static void isolated_call_filter::DestroyCallElem (grpc_call_element *, const grpc_call_final_info *, grpc_closure *then_sched_closure)
 
void phony_filter::DestroyChannelElem (grpc_channel_element *)
 
void isolated_call_filter::DestroyChannelElem (grpc_channel_element *)
 
void phony_transport::DestroyStream (grpc_transport *, grpc_stream *, grpc_closure *)
 
static void do_nothing (void *)
 
static void DoNothing (void *, grpc_error_handle)
 
static void FilterDestroy (void *arg, grpc_error_handle)
 
void phony_filter::GetChannelInfo (grpc_channel_element *, const grpc_channel_info *)
 
void isolated_call_filter::GetChannelInfo (grpc_channel_element *, const grpc_channel_info *)
 
grpc_endpointphony_transport::GetEndpoint (grpc_transport *)
 
static grpc_error_handle phony_filter::InitCallElem (grpc_call_element *, const grpc_call_element_args *)
 
static grpc_error_handle isolated_call_filter::InitCallElem (grpc_call_element *elem, const grpc_call_element_args *args)
 
grpc_error_handle phony_filter::InitChannelElem (grpc_channel_element *, grpc_channel_element_args *)
 
grpc_error_handle isolated_call_filter::InitChannelElem (grpc_channel_element *, grpc_channel_element_args *)
 
int phony_transport::InitStream (grpc_transport *, grpc_stream *, grpc_stream_refcount *, const void *, grpc_core::Arena *)
 
int main (int argc, char **argv)
 
void phony_transport::PerformOp (grpc_transport *, grpc_transport_op *)
 
void phony_transport::PerformStreamOp (grpc_transport *, grpc_stream *, grpc_transport_stream_op_batch *op)
 
void benchmark::RunTheBenchmarksNamespaced ()
 
void phony_transport::SetPollset (grpc_transport *, grpc_stream *, grpc_pollset *)
 
static void phony_filter::SetPollsetOrPollsetSet (grpc_call_element *, grpc_polling_entity *)
 
static void isolated_call_filter::SetPollsetOrPollsetSet (grpc_call_element *, grpc_polling_entity *)
 
void phony_transport::SetPollsetSet (grpc_transport *, grpc_stream *, grpc_pollset_set *)
 
static void phony_filter::StartTransportOp (grpc_channel_element *, grpc_transport_op *)
 
static void isolated_call_filter::StartTransportOp (grpc_channel_element *, grpc_transport_op *op)
 
static void phony_filter::StartTransportStreamOp (grpc_call_element *, grpc_transport_stream_op_batch *)
 
static void isolated_call_filter::StartTransportStreamOp (grpc_call_element *elem, grpc_transport_stream_op_batch *op)
 
static grpc_arg StringArg (const char *key, const char *value)
 
static void * tag (int i)
 

Variables

static auto * g_memory_allocator
 
static const grpc_channel_filter isolated_call_filter::isolated_call_filter
 
const char * phony_transport::name
 
static const grpc_channel_filter phony_filter::phony_filter
 
static grpc_transport phony_transport::phony_transport = {&phony_transport_vtable}
 
static const grpc_transport_vtable phony_transport::phony_transport_vtable
 
size_t phony_transport::sizeof_stream
 

Typedef Documentation

◆ ClientChannelFilter

Definition at line 608 of file bm_call_create.cc.

◆ ClientDeadlineFilter

Definition at line 614 of file bm_call_create.cc.

◆ CompressFilter

Definition at line 610 of file bm_call_create.cc.

◆ HttpClientFilter

Definition at line 623 of file bm_call_create.cc.

◆ HttpServerFilter

Definition at line 627 of file bm_call_create.cc.

◆ MessageSizeFilter

Definition at line 630 of file bm_call_create.cc.

◆ NoFilter

typedef Fixture<nullptr, 0> NoFilter

Definition at line 602 of file bm_call_create.cc.

◆ PhonyFilter

Definition at line 604 of file bm_call_create.cc.

◆ ServerDeadlineFilter

Definition at line 618 of file bm_call_create.cc.

Enumeration Type Documentation

◆ FixtureFlags

Enumerator
CHECKS_NOT_LAST 
REQUIRES_TRANSPORT 

Definition at line 353 of file bm_call_create.cc.

Function Documentation

◆ Arg()

Arg ( 64  ) -> Arg(128) ->Arg(256) ->Arg(512) ->Arg(1024) ->Arg(1536) ->Arg(2048) ->Arg(3072) ->Arg(4096) ->Arg(5120) ->Arg(6144) ->Arg(7168)

◆ BENCHMARK() [1/6]

BENCHMARK ( BM_IsolatedCall_NoOp  )

◆ BENCHMARK() [2/6]

◆ BENCHMARK() [3/6]

BENCHMARK ( BM_IsolatedCall_Unary  )

◆ BENCHMARK() [4/6]

◆ BENCHMARK() [5/6]

◆ BENCHMARK() [6/6]

BENCHMARK ( BM_LameChannelCallCreateCpp  )

◆ BENCHMARK_TEMPLATE() [1/13]

BENCHMARK_TEMPLATE ( BM_CallCreateDestroy  ,
InsecureChannel   
)

◆ BENCHMARK_TEMPLATE() [2/13]

BENCHMARK_TEMPLATE ( BM_CallCreateDestroy  ,
LameChannel   
)

◆ BENCHMARK_TEMPLATE() [3/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
ClientDeadlineFilter  ,
NoOp   
)

◆ BENCHMARK_TEMPLATE() [4/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
ClientDeadlineFilter  ,
SendEmptyMetadata   
)

◆ BENCHMARK_TEMPLATE() [5/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
CompressFilter  ,
NoOp   
)

◆ BENCHMARK_TEMPLATE() [6/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
CompressFilter  ,
SendEmptyMetadata   
)

◆ BENCHMARK_TEMPLATE() [7/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
MessageSizeFilter  ,
NoOp   
)

◆ BENCHMARK_TEMPLATE() [8/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
MessageSizeFilter  ,
SendEmptyMetadata   
)

◆ BENCHMARK_TEMPLATE() [9/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
NoFilter  ,
NoOp   
)

◆ BENCHMARK_TEMPLATE() [10/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
PhonyFilter  ,
NoOp   
)

◆ BENCHMARK_TEMPLATE() [11/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
PhonyFilter  ,
SendEmptyMetadata   
)

◆ BENCHMARK_TEMPLATE() [12/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
ServerDeadlineFilter  ,
NoOp   
)

◆ BENCHMARK_TEMPLATE() [13/13]

BENCHMARK_TEMPLATE ( BM_IsolatedFilter  ,
ServerDeadlineFilter  ,
SendEmptyMetadata   
)

◆ BM_CallCreateDestroy()

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

Definition at line 118 of file bm_call_create.cc.

◆ BM_IsolatedCall_NoOp()

static void BM_IsolatedCall_NoOp ( benchmark::State state)
static

Definition at line 757 of file bm_call_create.cc.

◆ BM_IsolatedCall_StreamingSend()

static void BM_IsolatedCall_StreamingSend ( benchmark::State state)
static

Definition at line 818 of file bm_call_create.cc.

◆ BM_IsolatedCall_Unary()

static void BM_IsolatedCall_Unary ( benchmark::State state)
static

Definition at line 772 of file bm_call_create.cc.

◆ BM_IsolatedFilter()

template<class Fixture , class TestOp >
static void BM_IsolatedFilter ( benchmark::State state)
static

Definition at line 521 of file bm_call_create.cc.

◆ BM_LameChannelCallCreateCore()

static void BM_LameChannelCallCreateCore ( benchmark::State state)
static

Definition at line 173 of file bm_call_create.cc.

◆ BM_LameChannelCallCreateCoreSeparateBatch()

static void BM_LameChannelCallCreateCoreSeparateBatch ( benchmark::State state)
static

Definition at line 247 of file bm_call_create.cc.

◆ BM_LameChannelCallCreateCpp()

static void BM_LameChannelCallCreateCpp ( benchmark::State state)
static

Definition at line 144 of file bm_call_create.cc.

◆ BM_Zalloc()

void BM_Zalloc ( benchmark::State state)

Definition at line 60 of file bm_call_create.cc.

◆ CreateChannel()

static grpc_channel* CreateChannel ( )
static

Definition at line 98 of file bm_call_create.cc.

◆ do_nothing()

static void do_nothing ( void *  )
static

Definition at line 171 of file bm_call_create.cc.

◆ DoNothing()

static void DoNothing ( void *  ,
grpc_error_handle   
)
static

Definition at line 334 of file bm_call_create.cc.

◆ FilterDestroy()

static void FilterDestroy ( void *  arg,
grpc_error_handle   
)
static

Definition at line 330 of file bm_call_create.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 864 of file bm_call_create.cc.

◆ StringArg()

static grpc_arg StringArg ( const char *  key,
const char *  value 
)
static

Definition at line 345 of file bm_call_create.cc.

◆ tag()

static void* tag ( int  i)
static

Definition at line 140 of file bm_call_create.cc.

Variable Documentation

◆ g_memory_allocator

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

Definition at line 56 of file bm_call_create.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