forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stats: Remove remaining calls to Stats::Scope::counter() et al in sou…
…rce/..., found by adding more patterns to the check-format script (envoyproxy#10189) Signed-off-by: Joshua Marantz <[email protected]>
- Loading branch information
Showing
31 changed files
with
221 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "common/grpc/stat_names.h" | ||
|
||
namespace Envoy { | ||
namespace Grpc { | ||
|
||
StatNames::StatNames(Stats::SymbolTable& symbol_table) | ||
: pool_(symbol_table), streams_total_(pool_.add("streams_total")) { | ||
for (uint32_t i = 0; i <= Status::WellKnownGrpcStatus::MaximumKnown; ++i) { | ||
std::string status_str = absl::StrCat(i); | ||
streams_closed_[i] = pool_.add(absl::StrCat("streams_closed_", status_str)); | ||
status_names_[status_str] = pool_.add(status_str); | ||
} | ||
} | ||
|
||
} // namespace Grpc | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
#include "envoy/grpc/status.h" | ||
|
||
#include "common/stats/symbol_table_impl.h" | ||
|
||
#include "absl/container/flat_hash_map.h" | ||
|
||
namespace Envoy { | ||
namespace Grpc { | ||
|
||
/** | ||
* Captures symbolized representation for tokens used in grpc stats. These are | ||
* broken out so they can be allocated early and used across all gRPC-related | ||
* filters. | ||
*/ | ||
struct StatNames { | ||
explicit StatNames(Stats::SymbolTable& symbol_table); | ||
|
||
Stats::StatNamePool pool_; | ||
Stats::StatName streams_total_; | ||
std::array<Stats::StatName, Status::WellKnownGrpcStatus::MaximumKnown + 1> streams_closed_; | ||
absl::flat_hash_map<std::string, Stats::StatName> status_names_; | ||
}; | ||
|
||
} // namespace Grpc | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.