Skip to content

Commit

Permalink
use a more concrete stats implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Genera <pgenera@google.com>
  • Loading branch information
pgenera committed Dec 11, 2020
1 parent 1d3692f commit 256b961
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ envoy_cc_benchmark_binary(
"//source/common/config:grpc_subscription_lib",
"//source/common/config:protobuf_link_hacks",
"//source/common/config:utility_lib",
"//source/common/stats:thread_local_store_lib",
"//source/common/upstream:eds_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/server:transport_socket_config_lib",
Expand All @@ -132,6 +133,7 @@ envoy_cc_benchmark_binary(
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/stats:stats_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
Expand Down Expand Up @@ -159,6 +161,7 @@ envoy_cc_benchmark_binary(
"//source/common/config:grpc_subscription_lib",
"//source/common/config:protobuf_link_hacks",
"//source/common/config:utility_lib",
"//source/common/stats:thread_local_store_lib",
"//source/common/upstream:cds_api_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/server:transport_socket_config_lib",
Expand All @@ -168,6 +171,7 @@ envoy_cc_benchmark_binary(
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/stats:stats_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
Expand Down
5 changes: 4 additions & 1 deletion test/common/upstream/cds_speed_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "common/config/grpc_subscription_impl.h"
#include "common/config/utility.h"
#include "common/singleton/manager_impl.h"
#include "common/stats/thread_local_store.h"
#include "common/upstream/static_cluster.h"

#include "server/transport_socket_config_impl.h"
Expand Down Expand Up @@ -118,7 +119,9 @@ class CdsSpeedTest {
const std::string type_url_;
uint64_t version_{};
bool initialized_{};
Stats::TestUtil::TestStore stats_;
Stats::TestSymbolTable symbol_table_{};
Stats::AllocatorImpl stats_allocator_{*symbol_table_};
Stats::ThreadLocalStoreImpl stats_{stats_allocator_};
Config::SubscriptionStats subscription_stats_;
Ssl::MockContextManager ssl_context_manager_;
envoy::config::cluster::v3::Cluster static_cluster_;
Expand Down
5 changes: 4 additions & 1 deletion test/common/upstream/eds_speed_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "common/config/grpc_subscription_impl.h"
#include "common/config/utility.h"
#include "common/singleton/manager_impl.h"
#include "common/stats/thread_local_store.h"
#include "common/upstream/eds.h"

#include "server/transport_socket_config_impl.h"
Expand Down Expand Up @@ -145,7 +146,9 @@ class EdsSpeedTest {
const std::string type_url_;
uint64_t version_{};
bool initialized_{};
Stats::TestUtil::TestStore stats_;
Stats::TestSymbolTable symbol_table_{};
Stats::AllocatorImpl stats_allocator_{*symbol_table_};
Stats::ThreadLocalStoreImpl stats_{stats_allocator_};
Config::SubscriptionStats subscription_stats_;
Ssl::MockContextManager ssl_context_manager_;
envoy::config::cluster::v3::Cluster eds_cluster_;
Expand Down

0 comments on commit 256b961

Please sign in to comment.