Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 6daa43a

Browse files
author
Ian Sturdy
authored
Remove some unused constants, and move constants to an anonymous namespace. (#119)
1 parent aa28871 commit 6daa43a

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

opencensus/plugins/grpc/internal/client_filter.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@
2323

2424
namespace opencensus {
2525

26+
namespace {
27+
2628
// Maximum size of metadata for tracing and tagging that are sent on the wire.
2729
constexpr uint32_t kMaxStatsLen = 2046;
2830
constexpr uint32_t kMaxTracingLen = 128;
29-
// Maximum size of server stats that are sent on the wire.
30-
constexpr uint32_t kMaxServerStatsLen = 32;
3131

3232
constexpr double kNumMillisPerNanosecond = 1e-6;
3333

34-
namespace {
35-
3634
void FilterTrailingMetadata(grpc_metadata_batch *b, uint64_t *elapsed_time) {
3735
if (b->idx.named.grpc_server_stats_bin != nullptr) {
3836
ServerStatsDeserialize(

opencensus/plugins/grpc/internal/server_filter.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,11 @@
2525

2626
namespace opencensus {
2727

28-
// Maximum size of metadata for tracing and tagging that are sent on the wire.
29-
constexpr uint32_t kMaxStatsLen = 2046;
30-
constexpr uint32_t kMaxTracingLen = 128;
28+
namespace {
29+
3130
// Maximum size of server stats that are sent on the wire.
3231
constexpr uint32_t kMaxServerStatsLen = 32;
3332

34-
constexpr double kNumMillisPerNanosecond = 1e-6;
35-
36-
namespace {
37-
3833
// server metadata elements
3934
struct ServerMetadataElements {
4035
grpc_slice path;

0 commit comments

Comments
 (0)