YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/tserver/backup.proxy.cc
Line
Count
Source (jump to first uncovered line)
1
// THIS FILE IS AUTOGENERATED FROM yb/tserver/backup.proto
2
3
#include "yb/tserver/backup.proxy.h"
4
5
#include "yb/tserver/backup.service.h"
6
7
#include "yb/rpc/proxy.h"
8
#include "yb/rpc/outbound_call.h"
9
#include "yb/util/metrics.h"
10
#include "yb/util/net/sockaddr.h"
11
12
METRIC_DEFINE_counter(
13
  server, proxy_request_bytes_yb_tserver_TabletServerBackupService_TabletSnapshotOp,
14
  "Bytes sent by yb.tserver.TabletServerBackupService.TabletSnapshotOp() RPC requests",
15
  yb::MetricUnit::kBytes,
16
  "Bytes sent by yb.tserver.TabletServerBackupService.TabletSnapshotOp() RPC requests");
17
18
METRIC_DEFINE_counter(
19
  server, proxy_response_bytes_yb_tserver_TabletServerBackupService_TabletSnapshotOp,
20
  "Bytes received in response to yb.tserver.TabletServerBackupService.TabletSnapshotOp() RPC requests",
21
  yb::MetricUnit::kBytes,
22
  "Bytes received in response to yb.tserver.TabletServerBackupService.TabletSnapshotOp() RPC requests");
23
24
namespace yb {
25
namespace tserver {
26
27
28
namespace {
29
30
const std::string kFullTabletServerBackupServiceName = "yb.tserver.TabletServerBackupService";
31
32
1.42k
::yb::rpc::ProxyMetricsPtr CreateTabletServerBackupServiceMetrics(const scoped_refptr<MetricEntity>& entity) {
33
1.42k
  auto result = std::make_shared<::yb::rpc::ProxyMetricsImpl<1>>();
34
1.42k
  result->value[to_underlying(TabletServerBackupServiceRpcMethodIndexes::kTabletSnapshotOp)] = {
35
1.42k
      METRIC_proxy_request_bytes_yb_tserver_TabletServerBackupService_TabletSnapshotOp.Instantiate(entity),
36
1.42k
      METRIC_proxy_response_bytes_yb_tserver_TabletServerBackupService_TabletSnapshotOp.Instantiate(entity)
37
1.42k
  };
38
39
1.42k
  return result;
40
1.42k
}
41
42
43
} // namespace
44
45
TabletServerBackupServiceProxy::TabletServerBackupServiceProxy(
46
    ::yb::rpc::ProxyCache* cache, const ::yb::HostPort& remote,
47
    const ::yb::rpc::Protocol* protocol,
48
    const ::yb::MonoDelta& resolve_cache_timeout)
49
    : ProxyBase(kFullTabletServerBackupServiceName, &CreateTabletServerBackupServiceMetrics,
50
4.14k
                cache, remote, protocol, resolve_cache_timeout) {}
51
52
::yb::Status TabletServerBackupServiceProxy::TabletSnapshotOp(
53
4
    const ::yb::tserver::TabletSnapshotOpRequestPB &req, ::yb::tserver::TabletSnapshotOpResponsePB *resp, ::yb::rpc::RpcController *controller) const {
54
4
  static ::yb::rpc::RemoteMethod method("yb.tserver.TabletServerBackupService", "TabletSnapshotOp");
55
4
  return proxy().SyncRequest(
56
4
      &method, metrics<1>(static_cast<size_t>(TabletServerBackupServiceRpcMethodIndexes::kTabletSnapshotOp)), req, resp, controller);
57
4
}
58
59
void TabletServerBackupServiceProxy::TabletSnapshotOpAsync(
60
    const ::yb::tserver::TabletSnapshotOpRequestPB &req, ::yb::tserver::TabletSnapshotOpResponsePB *resp, ::yb::rpc::RpcController *controller,
61
0
    ::yb::rpc::ResponseCallback callback) const {
62
0
  static ::yb::rpc::RemoteMethod method("yb.tserver.TabletServerBackupService", "TabletSnapshotOp");
63
0
  proxy().AsyncRequest(
64
0
      &method, metrics<1>(static_cast<size_t>(TabletServerBackupServiceRpcMethodIndexes::kTabletSnapshotOp)), req, resp, controller, std::move(callback));
65
0
}
66
67
} // namespace tserver
68
} // namespace yb