Skip to content

Commit

Permalink
stats: remove symbol table interface file and rename files to be cons…
Browse files Browse the repository at this point in the history
…istent (envoyproxy#19788)

Commit Message: follow-up to envoyproxy#19597 -- removes trivial forward decls from envoy/stats/symbol_table.h and renames all the files to reflect this is no longer an interface/impl pattern but a single implementation.

This PR has a lot of files but all the changes are renames of includes except for the removal of envoy/stats/symbol_table.h and the moving of its forward decls into envoy/stats/stats.h.
Additional Description:
Risk Level: llw
Testing: //test/...
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Joshua Marantz <[email protected]>
  • Loading branch information
jmarantz authored Feb 4, 2022
1 parent ecd39b8 commit 0d110de
Show file tree
Hide file tree
Showing 91 changed files with 96 additions and 121 deletions.
2 changes: 1 addition & 1 deletion contrib/sip_proxy/filters/network/source/tra/stat_names.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Extensions {
Expand Down
1 change: 0 additions & 1 deletion envoy/http/codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <chrono>

#include "envoy/stats/scope.h"
#include "envoy/stats/symbol_table.h"

namespace Envoy {
namespace Http {
Expand Down
2 changes: 1 addition & 1 deletion envoy/local_info/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ envoy_cc_library(
deps = [
"//envoy/config:context_provider_interface",
"//envoy/network:address_interface",
"//envoy/stats:symbol_table_interface",
"//envoy/stats:stats_interface",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
)
2 changes: 1 addition & 1 deletion envoy/local_info/local_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "envoy/config/context_provider.h"
#include "envoy/config/core/v3/base.pb.h"
#include "envoy/network/address.h"
#include "envoy/stats/symbol_table.h"
#include "envoy/stats/stats.h"

namespace Envoy {
namespace LocalInfo {
Expand Down
2 changes: 1 addition & 1 deletion envoy/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ envoy_cc_library(
name = "proactive_resource_monitor_interface",
hdrs = ["proactive_resource_monitor.h"],
deps = [
"//envoy/stats:stats_interface",
"//source/common/stats:symbol_table_lib",
],
)

Expand Down
2 changes: 1 addition & 1 deletion envoy/server/proactive_resource_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "envoy/stats/stats.h"

#include "source/common/common/assert.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Server {
Expand Down
6 changes: 0 additions & 6 deletions envoy/stats/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ envoy_cc_library(
external_deps = ["abseil_inlined_vector"],
deps = [
":refcount_ptr_interface",
":symbol_table_interface",
"//envoy/common:interval_set_interface",
"//envoy/common:time_interface",
],
Expand All @@ -49,11 +48,6 @@ envoy_cc_library(
],
)

envoy_cc_library(
name = "symbol_table_interface",
hdrs = ["symbol_table.h"],
)

envoy_cc_library(
name = "timespan_interface",
hdrs = ["timespan.h"],
Expand Down
1 change: 0 additions & 1 deletion envoy/stats/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "envoy/common/pure.h"
#include "envoy/stats/stats.h"
#include "envoy/stats/symbol_table.h"
#include "envoy/stats/tag.h"

#include "absl/strings/string_view.h"
Expand Down
1 change: 0 additions & 1 deletion envoy/stats/scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "envoy/common/pure.h"
#include "envoy/stats/histogram.h"
#include "envoy/stats/symbol_table.h"
#include "envoy/stats/tag.h"

#include "absl/types/optional.h"
Expand Down
11 changes: 10 additions & 1 deletion envoy/stats/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,23 @@

#include "envoy/common/pure.h"
#include "envoy/stats/refcount_ptr.h"
#include "envoy/stats/symbol_table.h"
#include "envoy/stats/tag.h"

#include "absl/strings/string_view.h"

namespace Envoy {
namespace Stats {

/**
* Runtime representation of an encoded stat name.
*/
class StatName;

/**
* Holds a set of symbols used to compose hierarhical names.
*/
class SymbolTable;

/**
* General interface for all stats objects.
*/
Expand Down
2 changes: 1 addition & 1 deletion envoy/stats/stats_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "envoy/stats/histogram.h"
#include "envoy/stats/stats.h"

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
#include "source/common/stats/utility.h"

#include "absl/strings/match.h"
Expand Down
22 changes: 0 additions & 22 deletions envoy/stats/symbol_table.h

This file was deleted.

4 changes: 2 additions & 2 deletions envoy/stats/tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

#include <string>

#include "envoy/stats/symbol_table.h"

#include "absl/types/optional.h"

namespace Envoy {
namespace Stats {

class StatName;

/**
* General representation of a tag.
*/
Expand Down
1 change: 0 additions & 1 deletion envoy/upstream/cluster_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "envoy/singleton/manager.h"
#include "envoy/ssl/context_manager.h"
#include "envoy/stats/store.h"
#include "envoy/stats/symbol_table.h"
#include "envoy/tcp/conn_pool.h"
#include "envoy/thread_local/thread_local.h"
#include "envoy/upstream/health_checker.h"
Expand Down
2 changes: 1 addition & 1 deletion source/common/common/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "source/common/common/assert.h"
#include "source/common/protobuf/utility.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "re2/re2.h"
#include "xds/type/matcher/v3/regex.pb.h"
Expand Down
2 changes: 2 additions & 0 deletions source/common/common/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include "source/common/common/hash.h"
#include "source/common/common/non_copyable.h"

#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/strings/string_view.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion source/common/grpc/context_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "source/common/common/hash.h"
#include "source/common/grpc/stat_names.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
#include "source/common/stats/utility.h"

#include "absl/types/optional.h"
Expand Down
2 changes: 1 addition & 1 deletion source/common/grpc/stat_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "envoy/grpc/status.h"

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "absl/container/flat_hash_map.h"

Expand Down
2 changes: 1 addition & 1 deletion source/common/http/codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "envoy/stats/scope.h"

#include "source/common/common/thread.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Http {
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/conn_manager_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "source/common/http/date_provider.h"
#include "source/common/local_reply/local_reply.h"
#include "source/common/network/utility.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Http {
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/user_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "envoy/stats/timespan.h"

#include "source/common/http/headers.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
#include "source/common/stats/utility.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/user_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "envoy/stats/stats_macros.h"
#include "envoy/stats/timespan.h"

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Http {
Expand Down
2 changes: 1 addition & 1 deletion source/common/local_info/local_info_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "envoy/local_info/local_info.h"

#include "source/common/config/context_provider_impl.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace LocalInfo {
Expand Down
2 changes: 1 addition & 1 deletion source/common/memory/heap_shrinker.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "source/common/memory/heap_shrinker.h"

#include "source/common/memory/utils.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "absl/strings/str_cat.h"

Expand Down
4 changes: 2 additions & 2 deletions source/common/quic/quic_stat_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "envoy/stats/scope.h"

#include "source/common/common/thread.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "quiche/quic/core/quic_error_codes.h"
#include "quiche/quic/core/quic_types.h"
Expand Down Expand Up @@ -50,7 +50,7 @@ class QuicStatNames {

#else

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
namespace Envoy {
namespace Quic {

Expand Down
2 changes: 1 addition & 1 deletion source/common/router/config_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "source/common/router/metadatamatchcriteria_impl.h"
#include "source/common/router/router_ratelimit.h"
#include "source/common/router/tls_context_match_criteria_impl.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "absl/container/node_hash_map.h"
#include "absl/types/optional.h"
Expand Down
2 changes: 1 addition & 1 deletion source/common/router/router.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "source/common/router/config_impl.h"
#include "source/common/router/context_impl.h"
#include "source/common/router/upstream_request.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
#include "source/common/stream_info/stream_info_impl.h"
#include "source/common/upstream/load_balancer_impl.h"

Expand Down
5 changes: 2 additions & 3 deletions source/common/stats/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,14 @@ envoy_cc_library(

envoy_cc_library(
name = "symbol_table_lib",
srcs = ["symbol_table_impl.cc"],
hdrs = ["symbol_table_impl.h"],
srcs = ["symbol_table.cc"],
hdrs = ["symbol_table.h"],
external_deps = [
"abseil_base",
"abseil_inlined_vector",
],
deps = [
":recent_lookups_lib",
"//envoy/stats:symbol_table_interface",
"//source/common/common:assert_lib",
"//source/common/common:mem_block_builder_lib",
"//source/common/common:minimal_logger_lib",
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/allocator_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "source/common/common/utility.h"
#include "source/common/stats/metric_impl.h"
#include "source/common/stats/stat_merger.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "absl/container/flat_hash_set.h"

Expand Down
1 change: 0 additions & 1 deletion source/common/stats/allocator_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "envoy/stats/allocator.h"
#include "envoy/stats/sink.h"
#include "envoy/stats/stats.h"
#include "envoy/stats/symbol_table.h"

#include "source/common/common/thread_synchronizer.h"
#include "source/common/stats/metric_impl.h"
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/isolated_store_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "source/common/stats/null_counter.h"
#include "source/common/stats/null_gauge.h"
#include "source/common/stats/store_impl.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
#include "source/common/stats/tag_utility.h"
#include "source/common/stats/utility.h"

Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/metric_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "envoy/stats/tag.h"

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Stats {
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/metric_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "envoy/stats/tag.h"

#include "source/common/common/assert.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Stats {
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/scope_prefixer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "envoy/stats/scope.h"

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"
#include "source/common/stats/utility.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/scope_prefixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "envoy/stats/scope.h"

#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

namespace Envoy {
namespace Stats {
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/stat_merger.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "envoy/stats/store.h"

#include "source/common/protobuf/protobuf.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "absl/container/flat_hash_map.h"

Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/stats_matcher_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "source/common/common/matchers.h"
#include "source/common/protobuf/protobuf.h"
#include "source/common/stats/symbol_table_impl.h"
#include "source/common/stats/symbol_table.h"

#include "absl/strings/string_view.h"

Expand Down
Loading

0 comments on commit 0d110de

Please sign in to comment.