channelz.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_LIB_CHANNEL_CHANNELZ_H
20 #define GRPC_CORE_LIB_CHANNEL_CHANNELZ_H
21 
23 
24 #include <stddef.h>
25 
26 #include <atomic>
27 #include <cstdint>
28 #include <map>
29 #include <set>
30 #include <string>
31 #include <utility>
32 #include <vector>
33 
34 #include "absl/strings/string_view.h"
35 #include "absl/types/optional.h"
36 
39 #include <grpc/slice.h>
40 
46 #include "src/core/lib/json/json.h"
47 
48 // Channel arg key for channelz node.
49 #define GRPC_ARG_CHANNELZ_CHANNEL_NODE "grpc.internal.channelz_channel_node"
50 
51 // Channel arg key for indicating an internal channel.
52 #define GRPC_ARG_CHANNELZ_IS_INTERNAL_CHANNEL \
53  "grpc.channelz_is_internal_channel"
54 
57 #define GRPC_ENABLE_CHANNELZ_DEFAULT true
58 
63 #define GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT (1024 * 4)
64 
65 namespace grpc_core {
66 
67 namespace channelz {
68 
69 class SocketNode;
70 class ListenSocketNode;
71 
72 namespace testing {
73 class CallCountingHelperPeer;
74 class ChannelNodePeer;
75 } // namespace testing
76 
77 // base class for all channelz entities
78 class BaseNode : public RefCounted<BaseNode> {
79  public:
80  // There are only four high level channelz entities. However, to support
81  // GetTopChannelsRequest, we split the Channel entity into two different
82  // types. All children of BaseNode must be one of these types.
83  enum class EntityType {
87  kServer,
88  kSocket,
89  };
90 
91  protected:
93 
94  public:
95  ~BaseNode() override;
96 
97  // All children must implement this function.
98  virtual Json RenderJson() = 0;
99 
100  // Renders the json and returns allocated string that must be freed by the
101  // caller.
103 
104  EntityType type() const { return type_; }
105  intptr_t uuid() const { return uuid_; }
106  const std::string& name() const { return name_; }
107 
108  private:
109  // to allow the ChannelzRegistry to set uuid_ under its lock.
110  friend class ChannelzRegistry;
114 };
115 
116 // This class is a helper class for channelz entities that deal with Channels,
117 // Subchannels, and Servers, since those have similar proto definitions.
118 // This class has the ability to:
119 // - track calls_{started,succeeded,failed}
120 // - track last_call_started_timestamp
121 // - perform rendering of the above items
123  public:
125 
126  void RecordCallStarted();
127  void RecordCallFailed();
128  void RecordCallSucceeded();
129 
130  // Common rendering of the call count data and last_call_started_timestamp.
131  void PopulateCallCounts(Json::Object* json);
132 
133  private:
134  // testing peer friend.
136 
137  // TODO(soheil): add a proper PerCPU helper and use it here.
139  // Define the ctors so that we can use this structure in InlinedVector.
140  AtomicCounterData() = default;
142  : calls_started(that.calls_started.load(std::memory_order_relaxed)),
143  calls_succeeded(that.calls_succeeded.load(std::memory_order_relaxed)),
144  calls_failed(that.calls_failed.load(std::memory_order_relaxed)),
146  that.last_call_started_cycle.load(std::memory_order_relaxed)) {}
147 
148  std::atomic<int64_t> calls_started{0};
149  std::atomic<int64_t> calls_succeeded{0};
150  std::atomic<int64_t> calls_failed{0};
151  std::atomic<gpr_cycle_counter> last_call_started_cycle{0};
152  // Make sure the size is exactly one cache line.
153  uint8_t padding[GPR_CACHELINE_SIZE - 3 * sizeof(std::atomic<intptr_t>) -
154  sizeof(std::atomic<gpr_cycle_counter>)];
155  };
156  // TODO(soheilhy,veblush): Revist this after abseil integration.
157  // This has a problem when using abseil inlined_vector because it
158  // carries an alignment attribute properly but our allocator doesn't
159  // respect this. To avoid UBSAN errors, this should be removed with
160  // abseil inlined_vector.
161  // GPR_ALIGN_STRUCT(GPR_CACHELINE_SIZE);
162 
163  struct CounterData {
167  gpr_cycle_counter last_call_started_cycle = 0;
168  };
169 
170  // collects the sharded data into one CounterData struct.
171  void CollectData(CounterData* out);
172 
173  std::vector<AtomicCounterData> per_cpu_counter_data_storage_;
174  size_t num_cores_ = 0;
175 };
176 
177 // Handles channelz bookkeeping for channels
178 class ChannelNode : public BaseNode {
179  public:
180  ChannelNode(std::string target, size_t channel_tracer_max_nodes,
181  bool is_internal_channel);
182 
185  }
186 
187  // Returns the string description of the given connectivity state.
188  static const char* GetChannelConnectivityStateChangeString(
190 
191  Json RenderJson() override;
192 
193  // proxy methods to composed classes.
196  }
198  const grpc_slice& data,
199  RefCountedPtr<BaseNode> referenced_channel) {
201  std::move(referenced_channel));
202  }
206 
208 
209  // TODO(roth): take in a RefCountedPtr to the child channel so we can retrieve
210  // the human-readable name.
211  void AddChildChannel(intptr_t child_uuid);
212  void RemoveChildChannel(intptr_t child_uuid);
213 
214  // TODO(roth): take in a RefCountedPtr to the child subchannel so we can
215  // retrieve the human-readable name.
216  void AddChildSubchannel(intptr_t child_uuid);
217  void RemoveChildSubchannel(intptr_t child_uuid);
218 
219  private:
220  // Allows the channel trace test to access trace_.
222 
223  void PopulateChildRefs(Json::Object* json);
224 
228 
229  // Least significant bit indicates whether the value is set. Remaining
230  // bits are a grpc_connectivity_state value.
231  std::atomic<int> connectivity_state_{0};
232 
233  Mutex child_mu_; // Guards sets below.
234  std::set<intptr_t> child_channels_;
235  std::set<intptr_t> child_subchannels_;
236 };
237 
238 // Handles channelz bookkeeping for servers
239 class ServerNode : public BaseNode {
240  public:
241  explicit ServerNode(size_t channel_tracer_max_nodes);
242 
243  ~ServerNode() override;
244 
245  Json RenderJson() override;
246 
247  std::string RenderServerSockets(intptr_t start_socket_id,
248  intptr_t max_results);
249 
251 
252  void RemoveChildSocket(intptr_t child_uuid);
253 
255 
256  void RemoveChildListenSocket(intptr_t child_uuid);
257 
258  // proxy methods to composed classes.
261  }
263  const grpc_slice& data,
264  RefCountedPtr<BaseNode> referenced_channel) {
266  std::move(referenced_channel));
267  }
271 
272  private:
275  Mutex child_mu_; // Guards child maps below.
276  std::map<intptr_t, RefCountedPtr<SocketNode>> child_sockets_;
277  std::map<intptr_t, RefCountedPtr<ListenSocketNode>> child_listen_sockets_;
278 };
279 
280 #define GRPC_ARG_CHANNELZ_SECURITY "grpc.internal.channelz_security"
281 
282 // Handles channelz bookkeeping for sockets
283 class SocketNode : public BaseNode {
284  public:
285  struct Security : public RefCounted<Security> {
286  struct Tls {
287  // This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=50346
288  Tls() {}
289 
290  enum class NameType { kUnset = 0, kStandardName = 1, kOtherName = 2 };
292  // Holds the value of standard_name or other_names if type is not kUnset.
296 
297  Json RenderJson();
298  };
299  enum class ModelType { kUnset = 0, kTls = 1, kOther = 2 };
303 
304  Json RenderJson();
305 
306  grpc_arg MakeChannelArg() const;
307 
309  const grpc_channel_args* args);
310  };
311 
313  RefCountedPtr<Security> security);
314  ~SocketNode() override {}
315 
316  Json RenderJson() override;
317 
321  streams_succeeded_.fetch_add(1, std::memory_order_relaxed);
322  }
324  streams_failed_.fetch_add(1, std::memory_order_relaxed);
325  }
326  void RecordMessagesSent(uint32_t num_sent);
327  void RecordMessageReceived();
329  keepalives_sent_.fetch_add(1, std::memory_order_relaxed);
330  }
331 
332  const std::string& remote() { return remote_; }
333 
334  private:
335  std::atomic<int64_t> streams_started_{0};
336  std::atomic<int64_t> streams_succeeded_{0};
337  std::atomic<int64_t> streams_failed_{0};
338  std::atomic<int64_t> messages_sent_{0};
339  std::atomic<int64_t> messages_received_{0};
340  std::atomic<int64_t> keepalives_sent_{0};
341  std::atomic<gpr_cycle_counter> last_local_stream_created_cycle_{0};
342  std::atomic<gpr_cycle_counter> last_remote_stream_created_cycle_{0};
343  std::atomic<gpr_cycle_counter> last_message_sent_cycle_{0};
344  std::atomic<gpr_cycle_counter> last_message_received_cycle_{0};
348 };
349 
350 // Handles channelz bookkeeping for listen sockets
351 class ListenSocketNode : public BaseNode {
352  public:
354  ~ListenSocketNode() override {}
355 
356  Json RenderJson() override;
357 
358  private:
360 };
361 
362 } // namespace channelz
363 } // namespace grpc_core
364 
365 #endif /* GRPC_CORE_LIB_CHANNEL_CHANNELZ_H */
grpc_core::channelz::SocketNode::streams_failed_
std::atomic< int64_t > streams_failed_
Definition: channelz.h:337
grpc_arg
Definition: grpc_types.h:103
testing
Definition: aws_request_signer_test.cc:25
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
grpc_core::channelz::SocketNode::Security::Tls
Definition: channelz.h:286
grpc_core::channelz::ChannelNode::child_mu_
Mutex child_mu_
Definition: channelz.h:233
grpc_core::channelz::ChannelzRegistry
Definition: channelz_registry.h:37
bloat_diff.severity
def severity
Definition: bloat_diff.py:143
grpc_core::channelz::CallCountingHelper::AtomicCounterData::padding
uint8_t padding[GPR_CACHELINE_SIZE - 3 *sizeof(std::atomic< intptr_t >) - sizeof(std::atomic< gpr_cycle_counter >)]
Definition: channelz.h:154
grpc_core::channelz::SocketNode::Security
Definition: channelz.h:285
grpc_core::channelz::ChannelTrace::AddTraceEventWithReference
void AddTraceEventWithReference(Severity severity, const grpc_slice &data, RefCountedPtr< BaseNode > referenced_entity)
Definition: channel_trace.cc:113
grpc_core::channelz::ChannelNode::AddChildSubchannel
void AddChildSubchannel(intptr_t child_uuid)
Definition: src/core/lib/channel/channelz.cc:241
grpc_core::channelz::SocketNode::SocketNode
SocketNode(std::string local, std::string remote, std::string name, RefCountedPtr< Security > security)
Definition: src/core/lib/channel/channelz.cc:467
slice.h
grpc_core::channelz::SocketNode::Security::ModelType
ModelType
Definition: channelz.h:299
grpc_core::channelz::BaseNode::type_
const EntityType type_
Definition: channelz.h:111
grpc_core::channelz::ChannelNode::RemoveChildChannel
void RemoveChildChannel(intptr_t child_uuid)
Definition: src/core/lib/channel/channelz.cc:236
grpc_core::channelz::CallCountingHelper::per_cpu_counter_data_storage_
std::vector< AtomicCounterData > per_cpu_counter_data_storage_
Definition: channelz.h:173
grpc_core::channelz::CallCountingHelper::AtomicCounterData::last_call_started_cycle
std::atomic< gpr_cycle_counter > last_call_started_cycle
Definition: channelz.h:151
grpc_core::channelz::SocketNode::RecordMessagesSent
void RecordMessagesSent(uint32_t num_sent)
Definition: src/core/lib/channel/channelz.cc:486
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::channelz::SocketNode::Security::ModelType::kOther
@ kOther
grpc_core::channelz::BaseNode::~BaseNode
~BaseNode() override
Definition: src/core/lib/channel/channelz.cc:65
grpc_core::channelz::ChannelNode::RecordCallFailed
void RecordCallFailed()
Definition: channelz.h:204
grpc_core::channelz::SocketNode::streams_started_
std::atomic< int64_t > streams_started_
Definition: channelz.h:335
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
grpc_core::channelz::BaseNode::name_
std::string name_
Definition: channelz.h:113
grpc_core::channelz::testing::ChannelNodePeer
Definition: channel_trace_test.cc:45
grpc_core::channelz::BaseNode::EntityType::kSubchannel
@ kSubchannel
grpc_core::channelz::SocketNode::RecordStreamStartedFromRemote
void RecordStreamStartedFromRemote()
Definition: src/core/lib/channel/channelz.cc:480
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
grpc_core::channelz::SocketNode::messages_received_
std::atomic< int64_t > messages_received_
Definition: channelz.h:339
grpc_core::channelz::BaseNode::type
EntityType type() const
Definition: channelz.h:104
grpc_core::channelz::BaseNode::name
const std::string & name() const
Definition: channelz.h:106
grpc_core::channelz::CallCountingHelper::CounterData::calls_failed
int64_t calls_failed
Definition: channelz.h:166
grpc_core::channelz::SocketNode
Definition: channelz.h:283
grpc_core::channelz::SocketNode::Security::Tls::remote_certificate
std::string remote_certificate
Definition: channelz.h:295
grpc_core::channelz::BaseNode::EntityType::kTopLevelChannel
@ kTopLevelChannel
GPR_CACHELINE_SIZE
#define GPR_CACHELINE_SIZE
Definition: impl/codegen/port_platform.h:542
grpc_core::channelz::ServerNode::RemoveChildListenSocket
void RemoveChildListenSocket(intptr_t child_uuid)
Definition: src/core/lib/channel/channelz.cc:275
grpc_core::channelz::CallCountingHelper::AtomicCounterData::calls_succeeded
std::atomic< int64_t > calls_succeeded
Definition: channelz.h:149
grpc_core::channelz::SocketNode::security_
const RefCountedPtr< Security > security_
Definition: channelz.h:347
grpc_core::channelz::CallCountingHelper::AtomicCounterData::calls_failed
std::atomic< int64_t > calls_failed
Definition: channelz.h:150
grpc_core::channelz::CallCountingHelper::CallCountingHelper
CallCountingHelper()
Definition: src/core/lib/channel/channelz.cc:76
grpc_core::channelz::SocketNode::Security::Tls::RenderJson
Json RenderJson()
Definition: src/core/lib/channel/channelz.cc:345
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
grpc_core::channelz::CallCountingHelper::PopulateCallCounts
void PopulateCallCounts(Json::Object *json)
Definition: src/core/lib/channel/channelz.cc:121
grpc_core::channelz::SocketNode::RecordStreamStartedFromLocal
void RecordStreamStartedFromLocal()
Definition: src/core/lib/channel/channelz.cc:474
grpc_channel_args
Definition: grpc_types.h:132
grpc_core::channelz::SocketNode::remote
const std::string & remote()
Definition: channelz.h:332
grpc_core::channelz::CallCountingHelper::RecordCallFailed
void RecordCallFailed()
Definition: src/core/lib/channel/channelz.cc:92
grpc_core::channelz::SocketNode::Security::RenderJson
Json RenderJson()
Definition: src/core/lib/channel/channelz.cc:365
grpc_core::channelz::SocketNode::Security::Tls::NameType::kStandardName
@ kStandardName
grpc_core::channelz::ServerNode::call_counter_
CallCountingHelper call_counter_
Definition: channelz.h:273
grpc_connectivity_state
grpc_connectivity_state
Definition: include/grpc/impl/codegen/connectivity_state.h:30
grpc_core::channelz::ServerNode::child_mu_
Mutex child_mu_
Definition: channelz.h:275
grpc_core::channelz::ServerNode
Definition: channelz.h:239
grpc_core::channelz::CallCountingHelper::AtomicCounterData::AtomicCounterData
AtomicCounterData()=default
GRPC_ARG_CHANNELZ_CHANNEL_NODE
#define GRPC_ARG_CHANNELZ_CHANNEL_NODE
Definition: channelz.h:49
grpc_core::channelz::CallCountingHelper::AtomicCounterData::AtomicCounterData
AtomicCounterData(const AtomicCounterData &that)
Definition: channelz.h:141
grpc_types.h
grpc_core::channelz::ListenSocketNode::local_addr_
std::string local_addr_
Definition: channelz.h:359
grpc_core::channelz::SocketNode::Security::Tls::NameType
NameType
Definition: channelz.h:290
grpc_core::channelz::ChannelNode::SetConnectivityState
void SetConnectivityState(grpc_connectivity_state state)
Definition: src/core/lib/channel/channelz.cc:225
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
grpc_core::channelz::BaseNode::BaseNode
BaseNode(EntityType type, std::string name)
Definition: src/core/lib/channel/channelz.cc:59
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
grpc_core::channelz::SocketNode::RenderJson
Json RenderJson() override
Definition: src/core/lib/channel/channelz.cc:498
grpc_core::RefCountedPtr
Definition: ref_counted_ptr.h:35
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
grpc_core::channelz::ServerNode::RecordCallStarted
void RecordCallStarted()
Definition: channelz.h:268
grpc_core::channelz::ServerNode::AddTraceEvent
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice &data)
Definition: channelz.h:259
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
Json
JSON (JavaScript Object Notation).
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:227
grpc_core::channelz::testing::CallCountingHelperPeer
Definition: channelz_test.cc:46
grpc_core::channelz::BaseNode::EntityType
EntityType
Definition: channelz.h:83
grpc_core::channelz::SocketNode::RecordStreamFailed
void RecordStreamFailed()
Definition: channelz.h:323
grpc_core::channelz::ServerNode::RemoveChildSocket
void RemoveChildSocket(intptr_t child_uuid)
Definition: src/core/lib/channel/channelz.cc:265
grpc_core::channelz::ChannelNode::ChannelArgName
static absl::string_view ChannelArgName()
Definition: channelz.h:183
grpc_core::channelz::CallCountingHelper::RecordCallStarted
void RecordCallStarted()
Definition: src/core/lib/channel/channelz.cc:84
grpc_core::channelz::ChannelNode::AddChildChannel
void AddChildChannel(intptr_t child_uuid)
Definition: src/core/lib/channel/channelz.cc:231
grpc_core::channelz::ChannelNode::connectivity_state_
std::atomic< int > connectivity_state_
Definition: channelz.h:231
connectivity_state.h
grpc_core::channelz::ChannelNode::GetChannelConnectivityStateChangeString
static const char * GetChannelConnectivityStateChangeString(grpc_connectivity_state state)
Definition: src/core/lib/channel/channelz.cc:151
grpc_core::channelz::BaseNode::uuid_
intptr_t uuid_
Definition: channelz.h:112
grpc_core::channelz::SocketNode::last_message_sent_cycle_
std::atomic< gpr_cycle_counter > last_message_sent_cycle_
Definition: channelz.h:343
grpc_core::channelz::ServerNode::trace_
ChannelTrace trace_
Definition: channelz.h:274
grpc_core::channelz::BaseNode
Definition: channelz.h:78
grpc_core::channelz::CallCountingHelper::CounterData::calls_succeeded
int64_t calls_succeeded
Definition: channelz.h:165
absl::optional
Definition: abseil-cpp/absl/types/internal/optional.h:61
grpc_core::channelz::SocketNode::streams_succeeded_
std::atomic< int64_t > streams_succeeded_
Definition: channelz.h:336
grpc_core::channelz::SocketNode::RecordMessageReceived
void RecordMessageReceived()
Definition: src/core/lib/channel/channelz.cc:492
grpc_core::channelz::ListenSocketNode::ListenSocketNode
ListenSocketNode(std::string local_addr, std::string name)
Definition: src/core/lib/channel/channelz.cc:576
grpc_core::channelz::ChannelNode::RenderJson
Json RenderJson() override
Definition: src/core/lib/channel/channelz.cc:168
grpc_core::channelz::SocketNode::Security::Tls::name
std::string name
Definition: channelz.h:293
grpc_core::channelz::ServerNode::RecordCallSucceeded
void RecordCallSucceeded()
Definition: channelz.h:270
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
intptr_t
_W64 signed int intptr_t
Definition: stdint-msvc2008.h:118
grpc_core::channelz::CallCountingHelper::CollectData
void CollectData(CounterData *out)
Definition: src/core/lib/channel/channelz.cc:102
grpc_core::channelz::ServerNode::AddChildSocket
void AddChildSocket(RefCountedPtr< SocketNode > node)
Definition: src/core/lib/channel/channelz.cc:260
gen_build_yaml.load
def load(*args)
Definition: test/core/end2end/gen_build_yaml.py:25
grpc_core::channelz::ChannelNode::target_
std::string target_
Definition: channelz.h:225
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
grpc_core::channelz::ChannelTrace::Severity
Severity
Definition: channel_trace.h:51
grpc_core::channelz::ServerNode::RenderJson
Json RenderJson() override
Definition: src/core/lib/channel/channelz.cc:307
grpc_core::channelz::ChannelNode::AddTraceEvent
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice &data)
Definition: channelz.h:194
grpc_core::channelz::SocketNode::Security::Tls::NameType::kOtherName
@ kOtherName
json.h
grpc_core::RefCounted
Definition: ref_counted.h:280
grpc_core::channelz::CallCountingHelper::CounterData
Definition: channelz.h:163
grpc_core::channelz::SocketNode::keepalives_sent_
std::atomic< int64_t > keepalives_sent_
Definition: channelz.h:340
grpc_core::channelz::ChannelNode::child_channels_
std::set< intptr_t > child_channels_
Definition: channelz.h:234
grpc_core::channelz::SocketNode::Security::Tls::Tls
Tls()
Definition: channelz.h:288
grpc_core::channelz::SocketNode::RecordStreamSucceeded
void RecordStreamSucceeded()
Definition: channelz.h:320
grpc_core::channelz::SocketNode::Security::GetFromChannelArgs
static RefCountedPtr< Security > GetFromChannelArgs(const grpc_channel_args *args)
Definition: src/core/lib/channel/channelz.cc:411
grpc_core::channelz::ChannelNode::RecordCallSucceeded
void RecordCallSucceeded()
Definition: channelz.h:205
grpc_core::channelz::BaseNode::EntityType::kInternalChannel
@ kInternalChannel
grpc_core::channelz::BaseNode::EntityType::kSocket
@ kSocket
grpc_core::channelz::ChannelNode
Definition: channelz.h:178
grpc_core::channelz::ServerNode::~ServerNode
~ServerNode() override
Definition: src/core/lib/channel/channelz.cc:258
grpc_core::channelz::SocketNode::Security::tls
absl::optional< Tls > tls
Definition: channelz.h:301
grpc_core::channelz::SocketNode::last_local_stream_created_cycle_
std::atomic< gpr_cycle_counter > last_local_stream_created_cycle_
Definition: channelz.h:341
grpc_core::channelz::BaseNode::uuid
intptr_t uuid() const
Definition: channelz.h:105
grpc_core::channelz::SocketNode::Security::type
ModelType type
Definition: channelz.h:300
grpc_core::channelz::SocketNode::RecordKeepaliveSent
void RecordKeepaliveSent()
Definition: channelz.h:328
grpc_core::channelz::SocketNode::local_
std::string local_
Definition: channelz.h:345
grpc_core::channelz::CallCountingHelper
Definition: channelz.h:122
grpc_core::Json::Object
std::map< std::string, Json > Object
Definition: src/core/lib/json/json.h:54
grpc_core::channelz::BaseNode::RenderJsonString
std::string RenderJsonString()
Definition: src/core/lib/channel/channelz.cc:67
grpc_core::channelz::ChannelNode::RecordCallStarted
void RecordCallStarted()
Definition: channelz.h:203
grpc_core::Mutex
Definition: src/core/lib/gprpp/sync.h:61
grpc_core::channelz::SocketNode::~SocketNode
~SocketNode() override
Definition: channelz.h:314
grpc_core::channelz::SocketNode::Security::ModelType::kUnset
@ kUnset
grpc_core::channelz::ListenSocketNode::~ListenSocketNode
~ListenSocketNode() override
Definition: channelz.h:354
grpc_core::channelz::CallCountingHelper::AtomicCounterData::calls_started
std::atomic< int64_t > calls_started
Definition: channelz.h:148
grpc_core::channelz::SocketNode::last_message_received_cycle_
std::atomic< gpr_cycle_counter > last_message_received_cycle_
Definition: channelz.h:344
ref_counted.h
grpc_core::channelz::ChannelNode::child_subchannels_
std::set< intptr_t > child_subchannels_
Definition: channelz.h:235
grpc_core::channelz::SocketNode::messages_sent_
std::atomic< int64_t > messages_sent_
Definition: channelz.h:338
grpc_core::channelz::SocketNode::Security::Tls::NameType::kUnset
@ kUnset
grpc_core::channelz::SocketNode::remote_
std::string remote_
Definition: channelz.h:346
std
Definition: grpcpp/impl/codegen/async_unary_call.h:407
grpc_core::channelz::ServerNode::RenderServerSockets
std::string RenderServerSockets(intptr_t start_socket_id, intptr_t max_results)
Definition: src/core/lib/channel/channelz.cc:280
grpc_core::channelz::SocketNode::last_remote_stream_created_cycle_
std::atomic< gpr_cycle_counter > last_remote_stream_created_cycle_
Definition: channelz.h:342
grpc_core::channelz::ServerNode::ServerNode
ServerNode(size_t channel_tracer_max_nodes)
Definition: src/core/lib/channel/channelz.cc:255
grpc_core::channelz::SocketNode::Security::MakeChannelArg
grpc_arg MakeChannelArg() const
Definition: src/core/lib/channel/channelz.cc:405
state
Definition: bloaty/third_party/zlib/contrib/blast/blast.c:41
grpc_core::channelz::CallCountingHelper::num_cores_
size_t num_cores_
Definition: channelz.h:174
local
#define local
Definition: bloaty/third_party/zlib/contrib/blast/blast.c:36
channelz
void channelz(grpc_end2end_test_config config)
Definition: test/core/end2end/tests/channelz.cc:318
grpc_core::channelz::ListenSocketNode::RenderJson
Json RenderJson() override
Definition: src/core/lib/channel/channelz.cc:580
grpc_core::channelz::ChannelNode::ChannelNode
ChannelNode(std::string target, size_t channel_tracer_max_nodes, bool is_internal_channel)
Definition: src/core/lib/channel/channelz.cc:143
grpc_core::channelz::CallCountingHelper::CounterData::last_call_started_cycle
gpr_cycle_counter last_call_started_cycle
Definition: channelz.h:167
ref_counted_ptr.h
grpc_core::channelz::ChannelNode::trace_
ChannelTrace trace_
Definition: channelz.h:227
grpc_core::channelz::SocketNode::Security::Tls::type
NameType type
Definition: channelz.h:291
grpc_core::channelz::CallCountingHelper::CounterData::calls_started
int64_t calls_started
Definition: channelz.h:164
grpc_core::channelz::CallCountingHelper::AtomicCounterData
Definition: channelz.h:138
grpc_core::channelz::CallCountingHelper::RecordCallSucceeded
void RecordCallSucceeded()
Definition: src/core/lib/channel/channelz.cc:97
grpc_core::channelz::ChannelNode::PopulateChildRefs
void PopulateChildRefs(Json::Object *json)
Definition: src/core/lib/channel/channelz.cc:203
grpc_core::channelz::ChannelNode::RemoveChildSubchannel
void RemoveChildSubchannel(intptr_t child_uuid)
Definition: src/core/lib/channel/channelz.cc:246
grpc_core::channelz::ServerNode::child_sockets_
std::map< intptr_t, RefCountedPtr< SocketNode > > child_sockets_
Definition: channelz.h:276
grpc_core::channelz::SocketNode::Security::ModelType::kTls
@ kTls
grpc_core::channelz::ChannelNode::AddTraceEventWithReference
void AddTraceEventWithReference(ChannelTrace::Severity severity, const grpc_slice &data, RefCountedPtr< BaseNode > referenced_channel)
Definition: channelz.h:197
grpc_core::channelz::ServerNode::AddTraceEventWithReference
void AddTraceEventWithReference(ChannelTrace::Severity severity, const grpc_slice &data, RefCountedPtr< BaseNode > referenced_channel)
Definition: channelz.h:262
grpc_core::channelz::ListenSocketNode
Definition: channelz.h:351
grpc_core::channelz::ServerNode::RecordCallFailed
void RecordCallFailed()
Definition: channelz.h:269
grpc_core::channelz::ServerNode::AddChildListenSocket
void AddChildListenSocket(RefCountedPtr< ListenSocketNode > node)
Definition: src/core/lib/channel/channelz.cc:270
channel_trace.h
grpc_core::channelz::ServerNode::child_listen_sockets_
std::map< intptr_t, RefCountedPtr< ListenSocketNode > > child_listen_sockets_
Definition: channelz.h:277
setup.target
target
Definition: third_party/bloaty/third_party/protobuf/python/setup.py:179
grpc_core::channelz::BaseNode::RenderJson
virtual Json RenderJson()=0
grpc_core::channelz::ChannelNode::call_counter_
CallCountingHelper call_counter_
Definition: channelz.h:226
sync.h
grpc_core::channelz::SocketNode::Security::other
absl::optional< Json > other
Definition: channelz.h:302
grpc_core::channelz::SocketNode::Security::Tls::local_certificate
std::string local_certificate
Definition: channelz.h:294
grpc_core::channelz::ChannelTrace
Definition: channel_trace.h:46
time_precise.h
port_platform.h
grpc_core::channelz::BaseNode::EntityType::kServer
@ kServer
grpc_core::channelz::ChannelTrace::AddTraceEvent
void AddTraceEvent(Severity severity, const grpc_slice &data)
Definition: channel_trace.cc:105


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:44