aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring')
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/DefaultMonitoring.cpp160
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/HttpClientMetrics.cpp22
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/MonitoringManager.cpp16
3 files changed, 99 insertions, 99 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/DefaultMonitoring.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/DefaultMonitoring.cpp
index 9953004bc3..4bd51be06f 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/DefaultMonitoring.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/DefaultMonitoring.cpp
@@ -1,7 +1,7 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * SPDX-License-Identifier: Apache-2.0.
+ */
#include <aws/core/utils/memory/AWSMemory.h>
#include <aws/core/monitoring/DefaultMonitoring.h>
@@ -21,22 +21,22 @@ namespace Aws
{
static const char DEFAULT_MONITORING_ALLOC_TAG[] = "DefaultMonitoringAllocTag";
static const int CLIENT_ID_LENGTH_LIMIT = 256;
- static const int USER_AGENT_LENGTH_LIMIT = 256;
+ static const int USER_AGENT_LENGTH_LIMIT = 256;
static const int ERROR_MESSAGE_LENGTH_LIMIT = 512;
const char DEFAULT_MONITORING_CLIENT_ID[] = ""; // default to empty;
- const char DEFAULT_MONITORING_HOST[] = "127.0.0.1"; // default to loopback ip address instead of "localhost" based on design specification.
+ const char DEFAULT_MONITORING_HOST[] = "127.0.0.1"; // default to loopback ip address instead of "localhost" based on design specification.
unsigned short DEFAULT_MONITORING_PORT = 31000; //default to 31000;
bool DEFAULT_MONITORING_ENABLE = false; //default to false;
const int DefaultMonitoring::DEFAULT_MONITORING_VERSION = 1;
const char DefaultMonitoring::DEFAULT_CSM_CONFIG_ENABLED[] = "csm_enabled";
const char DefaultMonitoring::DEFAULT_CSM_CONFIG_CLIENT_ID[] = "csm_client_id";
- const char DefaultMonitoring::DEFAULT_CSM_CONFIG_HOST[] = "csm_host";
+ const char DefaultMonitoring::DEFAULT_CSM_CONFIG_HOST[] = "csm_host";
const char DefaultMonitoring::DEFAULT_CSM_CONFIG_PORT[] = "csm_port";
const char DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_ENABLED[] = "AWS_CSM_ENABLED";
const char DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_CLIENT_ID[] = "AWS_CSM_CLIENT_ID";
- const char DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_HOST[] = "AWS_CSM_HOST";
+ const char DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_HOST[] = "AWS_CSM_HOST";
const char DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_PORT[] = "AWS_CSM_PORT";
@@ -45,13 +45,13 @@ namespace Aws
Aws::Utils::DateTime apiCallStartTime;
Aws::Utils::DateTime attemptStartTime;
int retryCount = 0;
- bool lastAttemptSucceeded = false;
- bool lastErrorRetryable = false; //doesn't apply if last attempt succeeded.
+ bool lastAttemptSucceeded = false;
+ bool lastErrorRetryable = false; //doesn't apply if last attempt succeeded.
const Aws::Client::HttpResponseOutcome* outcome = nullptr;
};
- static inline void FillRequiredFieldsToJson(Json::JsonValue& json,
- const Aws::String& type,
+ static inline void FillRequiredFieldsToJson(Json::JsonValue& json,
+ const Aws::String& type,
const Aws::String& service,
const Aws::String& api,
const Aws::String& clientId,
@@ -65,17 +65,17 @@ namespace Aws
.WithString("ClientId", clientId.substr(0, CLIENT_ID_LENGTH_LIMIT))
.WithInt64("Timestamp", timestamp.Millis())
.WithInteger("Version", version)
- .WithString("UserAgent", userAgent.substr(0, USER_AGENT_LENGTH_LIMIT));
+ .WithString("UserAgent", userAgent.substr(0, USER_AGENT_LENGTH_LIMIT));
}
static inline void FillRequiredApiCallFieldsToJson(Json::JsonValue& json,
int attemptCount,
- int64_t apiCallLatency,
- bool maxRetriesExceeded)
+ int64_t apiCallLatency,
+ bool maxRetriesExceeded)
{
json.WithInteger("AttemptCount", attemptCount)
- .WithInt64("Latency", apiCallLatency)
- .WithInteger("MaxRetriesExceeded", maxRetriesExceeded ? 1 : 0);
+ .WithInt64("Latency", apiCallLatency)
+ .WithInteger("MaxRetriesExceeded", maxRetriesExceeded ? 1 : 0);
}
static inline void FillRequiredApiAttemptFieldsToJson(Json::JsonValue& json,
@@ -86,7 +86,7 @@ namespace Aws
.WithInt64("AttemptLatency", attemptLatency);
}
- static inline void ExportResponseHeaderToJson(Json::JsonValue& json, const Aws::Http::HeaderValueCollection& headers,
+ static inline void ExportResponseHeaderToJson(Json::JsonValue& json, const Aws::Http::HeaderValueCollection& headers,
const Aws::String& headerName, const Aws::String& targetName)
{
auto iter = headers.find(headerName);
@@ -105,17 +105,17 @@ namespace Aws
}
}
- static inline void FillOptionalApiCallFieldsToJson(Json::JsonValue& json,
+ static inline void FillOptionalApiCallFieldsToJson(Json::JsonValue& json,
const Aws::Http::HttpRequest* request,
const Aws::Client::HttpResponseOutcome& outcome)
- {
- if (!request->GetSigningRegion().empty())
- {
- json.WithString("Region", request->GetSigningRegion());
- }
+ {
+ if (!request->GetSigningRegion().empty())
+ {
+ json.WithString("Region", request->GetSigningRegion());
+ }
if (!outcome.IsSuccess())
{
- if (outcome.GetError().GetExceptionName().empty()) // Not Aws Exception
+ if (outcome.GetError().GetExceptionName().empty()) // Not Aws Exception
{
json.WithString("FinalSdkExceptionMessage", outcome.GetError().GetMessage().substr(0, ERROR_MESSAGE_LENGTH_LIMIT));
}
@@ -126,20 +126,20 @@ namespace Aws
}
json.WithInteger("FinalHttpStatusCode", static_cast<int>(outcome.GetError().GetResponseCode()));
}
- else
+ else
{
json.WithInteger("FinalHttpStatusCode", static_cast<int>(outcome.GetResult()->GetResponseCode()));
}
- }
-
+ }
+
static inline void FillOptionalApiAttemptFieldsToJson(Json::JsonValue& json,
- const Aws::Http::HttpRequest* request,
+ const Aws::Http::HttpRequest* request,
const Aws::Client::HttpResponseOutcome& outcome,
const CoreMetricsCollection& metricsFromCore)
{
/**
*No matter request succeeded or not, these fields should be included as long as their requirements
- *are met. We should be able to access response (so as to access original request) if the response has error.
+ *are met. We should be able to access response (so as to access original request) if the response has error.
*/
if (request->HasAwsSessionToken() && !request->GetAwsSessionToken().empty())
{
@@ -159,10 +159,10 @@ namespace Aws
ExportResponseHeaderToJson(json, headers, StringUtils::ToLower("x-amzn-RequestId"), "XAmznRequestId");
ExportResponseHeaderToJson(json, headers, StringUtils::ToLower("x-amz-request-id"), "XAmzRequestId");
ExportResponseHeaderToJson(json, headers, StringUtils::ToLower("x-amz-id-2"), "XAmzId2");
-
+
if (!outcome.IsSuccess())
{
- if (outcome.GetError().GetExceptionName().empty()) // Not Aws Exception
+ if (outcome.GetError().GetExceptionName().empty()) // Not Aws Exception
{
json.WithString("SdkExceptionMessage", outcome.GetError().GetMessage().substr(0, ERROR_MESSAGE_LENGTH_LIMIT));
}
@@ -173,7 +173,7 @@ namespace Aws
}
json.WithInteger("HttpStatusCode", static_cast<int>(outcome.GetError().GetResponseCode()));
}
- else
+ else
{
json.WithInteger("HttpStatusCode", static_cast<int>(outcome.GetResult()->GetResponseCode()));
}
@@ -189,8 +189,8 @@ namespace Aws
ExportHttpMetricsToJson(json, metricsFromCore.httpClientMetrics, HttpClientMetricsType::TcpLatency);
}
- DefaultMonitoring::DefaultMonitoring(const Aws::String& clientId, const Aws::String& host, unsigned short port):
- m_udp(host.c_str(), port), m_clientId(clientId)
+ DefaultMonitoring::DefaultMonitoring(const Aws::String& clientId, const Aws::String& host, unsigned short port):
+ m_udp(host.c_str(), port), m_clientId(clientId)
{
}
@@ -221,7 +221,7 @@ namespace Aws
CollectAndSendAttemptData(serviceName, requestName, request, outcome, metricsFromCore, context);
}
- void DefaultMonitoring::OnRequestRetry(const Aws::String& serviceName, const Aws::String& requestName,
+ void DefaultMonitoring::OnRequestRetry(const Aws::String& serviceName, const Aws::String& requestName,
const std::shared_ptr<const Aws::Http::HttpRequest>& request, void* context) const
{
AWS_UNREFERENCED_PARAM(request);
@@ -232,7 +232,7 @@ namespace Aws
AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "OnRequestRetry Service: " << serviceName << "Request: " << requestName << " RetryCnt:" << defaultContext->retryCount);
}
- void DefaultMonitoring::OnFinish(const Aws::String& serviceName, const Aws::String& requestName,
+ void DefaultMonitoring::OnFinish(const Aws::String& serviceName, const Aws::String& requestName,
const std::shared_ptr<const Aws::Http::HttpRequest>& request, void* context) const
{
AWS_UNREFERENCED_PARAM(request);
@@ -241,72 +241,72 @@ namespace Aws
DefaultContext* defaultContext = static_cast<DefaultContext*>(context);
Aws::Utils::Json::JsonValue json;
FillRequiredFieldsToJson(json, "ApiCall", serviceName, requestName, m_clientId, defaultContext->apiCallStartTime, DEFAULT_MONITORING_VERSION, request->GetUserAgent());
- FillRequiredApiCallFieldsToJson(json, defaultContext->retryCount + 1, (DateTime::Now() - defaultContext->apiCallStartTime).count(), (!defaultContext->lastAttemptSucceeded && defaultContext->lastErrorRetryable));
+ FillRequiredApiCallFieldsToJson(json, defaultContext->retryCount + 1, (DateTime::Now() - defaultContext->apiCallStartTime).count(), (!defaultContext->lastAttemptSucceeded && defaultContext->lastErrorRetryable));
FillOptionalApiCallFieldsToJson(json, request.get(), *(defaultContext->outcome));
Aws::String compactData = json.View().WriteCompact();
- m_udp.SendData(reinterpret_cast<const uint8_t*>(compactData.c_str()), static_cast<int>(compactData.size()));
+ m_udp.SendData(reinterpret_cast<const uint8_t*>(compactData.c_str()), static_cast<int>(compactData.size()));
AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Send API Metrics: \n" << json.View().WriteReadable());
Aws::Delete(defaultContext);
}
void DefaultMonitoring::CollectAndSendAttemptData(const Aws::String& serviceName, const Aws::String& requestName,
- const std::shared_ptr<const Aws::Http::HttpRequest>& request, const Aws::Client::HttpResponseOutcome& outcome,
+ const std::shared_ptr<const Aws::Http::HttpRequest>& request, const Aws::Client::HttpResponseOutcome& outcome,
const CoreMetricsCollection& metricsFromCore, void* context) const
{
DefaultContext* defaultContext = static_cast<DefaultContext*>(context);
defaultContext->outcome = &outcome;
- defaultContext->lastAttemptSucceeded = outcome.IsSuccess() ? true : false;
- defaultContext->lastErrorRetryable = (!outcome.IsSuccess() && outcome.GetError().ShouldRetry()) ? true : false;
+ defaultContext->lastAttemptSucceeded = outcome.IsSuccess() ? true : false;
+ defaultContext->lastErrorRetryable = (!outcome.IsSuccess() && outcome.GetError().ShouldRetry()) ? true : false;
Aws::Utils::Json::JsonValue json;
FillRequiredFieldsToJson(json, "ApiCallAttempt", serviceName, requestName, m_clientId, defaultContext->attemptStartTime, DEFAULT_MONITORING_VERSION, request->GetUserAgent());
FillRequiredApiAttemptFieldsToJson(json, request->GetUri().GetAuthority(), (DateTime::Now() - defaultContext->attemptStartTime).count());
- FillOptionalApiAttemptFieldsToJson(json, request.get(), outcome, metricsFromCore);
+ FillOptionalApiAttemptFieldsToJson(json, request.get(), outcome, metricsFromCore);
Aws::String compactData = json.View().WriteCompact();
AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Send Attempt Metrics: \n" << json.View().WriteReadable());
- m_udp.SendData(reinterpret_cast<const uint8_t*>(compactData.c_str()), static_cast<int>(compactData.size()));
+ m_udp.SendData(reinterpret_cast<const uint8_t*>(compactData.c_str()), static_cast<int>(compactData.size()));
}
Aws::UniquePtr<MonitoringInterface> DefaultMonitoringFactory::CreateMonitoringInstance() const
- {
+ {
Aws::String clientId(DEFAULT_MONITORING_CLIENT_ID); // default to empty
- Aws::String host(DEFAULT_MONITORING_HOST); // default to 127.0.0.1
+ Aws::String host(DEFAULT_MONITORING_HOST); // default to 127.0.0.1
unsigned short port = DEFAULT_MONITORING_PORT; // default to 31000
bool enable = DEFAULT_MONITORING_ENABLE; //default to false;
//check profile_config
- Aws::String tmpEnable = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_ENABLED);
- Aws::String tmpClientId = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_CLIENT_ID);
- Aws::String tmpHost = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_HOST);
- Aws::String tmpPort = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_PORT);
-
- if (!tmpEnable.empty())
- {
- enable = StringUtils::CaselessCompare(tmpEnable.c_str(), "true") ? true : false;
- AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_enabled from profile_config to be " << enable);
- }
- if (!tmpClientId.empty())
- {
- clientId = tmpClientId;
- AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_client_id from profile_config to be " << clientId);
- }
+ Aws::String tmpEnable = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_ENABLED);
+ Aws::String tmpClientId = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_CLIENT_ID);
+ Aws::String tmpHost = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_HOST);
+ Aws::String tmpPort = Aws::Config::GetCachedConfigValue(DefaultMonitoring::DEFAULT_CSM_CONFIG_PORT);
- if (!tmpHost.empty())
+ if (!tmpEnable.empty())
{
- host = tmpHost;
- AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_host from profile_config to be " << host);
- }
-
- if (!tmpPort.empty())
- {
- port = static_cast<short>(StringUtils::ConvertToInt32(tmpPort.c_str()));
- AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_port from profile_config to be " << port);
+ enable = StringUtils::CaselessCompare(tmpEnable.c_str(), "true") ? true : false;
+ AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_enabled from profile_config to be " << enable);
+ }
+ if (!tmpClientId.empty())
+ {
+ clientId = tmpClientId;
+ AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_client_id from profile_config to be " << clientId);
+ }
+
+ if (!tmpHost.empty())
+ {
+ host = tmpHost;
+ AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_host from profile_config to be " << host);
}
+ if (!tmpPort.empty())
+ {
+ port = static_cast<short>(StringUtils::ConvertToInt32(tmpPort.c_str()));
+ AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved csm_port from profile_config to be " << port);
+ }
+
// check environment variables
- tmpEnable = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_ENABLED);
- tmpClientId = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_CLIENT_ID);
- tmpHost = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_HOST);
- tmpPort = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_PORT);
+ tmpEnable = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_ENABLED);
+ tmpClientId = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_CLIENT_ID);
+ tmpHost = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_HOST);
+ tmpPort = Aws::Environment::GetEnv(DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_PORT);
if (!tmpEnable.empty())
{
enable = StringUtils::CaselessCompare(tmpEnable.c_str(), "true") ? true : false;
@@ -318,11 +318,11 @@ namespace Aws
AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved AWS_CSM_CLIENT_ID from Environment variable to be " << clientId);
}
- if (!tmpHost.empty())
- {
- host = tmpHost;
- AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved AWS_CSM_HOST from Environment variable to be " << host);
- }
+ if (!tmpHost.empty())
+ {
+ host = tmpHost;
+ AWS_LOGSTREAM_DEBUG(DEFAULT_MONITORING_ALLOC_TAG, "Resolved AWS_CSM_HOST from Environment variable to be " << host);
+ }
if (!tmpPort.empty())
{
port = static_cast<unsigned short>(StringUtils::ConvertToInt32(tmpPort.c_str()));
@@ -333,7 +333,7 @@ namespace Aws
{
return nullptr;
}
- return Aws::MakeUnique<DefaultMonitoring>(DEFAULT_MONITORING_ALLOC_TAG, clientId, host, port);
+ return Aws::MakeUnique<DefaultMonitoring>(DEFAULT_MONITORING_ALLOC_TAG, clientId, host, port);
}
}
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/HttpClientMetrics.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/HttpClientMetrics.cpp
index f3ef582867..7207dc2bd8 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/HttpClientMetrics.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/HttpClientMetrics.cpp
@@ -1,6 +1,6 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/HashingUtils.h>
@@ -10,28 +10,28 @@ namespace Aws
{
namespace Monitoring
{
- static const char HTTP_CLIENT_METRICS_DESTINATION_IP[] = "DestinationIp";
+ static const char HTTP_CLIENT_METRICS_DESTINATION_IP[] = "DestinationIp";
static const char HTTP_CLIENT_METRICS_ACQUIRE_CONNECTION_LATENCY[] = "AcquireConnectionLatency";
static const char HTTP_CLIENT_METRICS_CONNECTION_REUSED[] = "ConnectionReused";
static const char HTTP_CLIENT_METRICS_CONNECTION_LATENCY[] = "ConnectLatency";
static const char HTTP_CLIENT_METRICS_REQUEST_LATENCY[] = "RequestLatency";
static const char HTTP_CLIENT_METRICS_DNS_LATENCY[] = "DnsLatency";
- static const char HTTP_CLIENT_METRICS_TCP_LATENCY[] = "TcpLatency";
+ static const char HTTP_CLIENT_METRICS_TCP_LATENCY[] = "TcpLatency";
static const char HTTP_CLIENT_METRICS_SSL_LATENCY[] = "SslLatency";
static const char HTTP_CLIENT_METRICS_UNKNOWN[] = "Unknown";
using namespace Aws::Utils;
HttpClientMetricsType GetHttpClientMetricTypeByName(const Aws::String& name)
{
- static std::map<int, HttpClientMetricsType> metricsNameHashToType =
+ static std::map<int, HttpClientMetricsType> metricsNameHashToType =
{
- std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_DESTINATION_IP), HttpClientMetricsType::DestinationIp),
+ std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_DESTINATION_IP), HttpClientMetricsType::DestinationIp),
std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_ACQUIRE_CONNECTION_LATENCY), HttpClientMetricsType::AcquireConnectionLatency),
std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_CONNECTION_REUSED), HttpClientMetricsType::ConnectionReused),
std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_CONNECTION_LATENCY), HttpClientMetricsType::ConnectLatency),
std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_REQUEST_LATENCY), HttpClientMetricsType::RequestLatency),
std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_DNS_LATENCY), HttpClientMetricsType::DnsLatency),
- std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_TCP_LATENCY), HttpClientMetricsType::TcpLatency),
+ std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_TCP_LATENCY), HttpClientMetricsType::TcpLatency),
std::pair<int, HttpClientMetricsType>(HashingUtils::HashString(HTTP_CLIENT_METRICS_SSL_LATENCY), HttpClientMetricsType::SslLatency)
};
@@ -46,15 +46,15 @@ namespace Aws
Aws::String GetHttpClientMetricNameByType(HttpClientMetricsType type)
{
- static std::map<int, std::string> metricsTypeToName =
+ static std::map<int, std::string> metricsTypeToName =
{
- std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::DestinationIp), HTTP_CLIENT_METRICS_DESTINATION_IP),
+ std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::DestinationIp), HTTP_CLIENT_METRICS_DESTINATION_IP),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::AcquireConnectionLatency), HTTP_CLIENT_METRICS_ACQUIRE_CONNECTION_LATENCY),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::ConnectionReused), HTTP_CLIENT_METRICS_CONNECTION_REUSED),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::ConnectLatency), HTTP_CLIENT_METRICS_CONNECTION_LATENCY),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::RequestLatency), HTTP_CLIENT_METRICS_REQUEST_LATENCY),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::DnsLatency), HTTP_CLIENT_METRICS_DNS_LATENCY),
- std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::TcpLatency), HTTP_CLIENT_METRICS_TCP_LATENCY),
+ std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::TcpLatency), HTTP_CLIENT_METRICS_TCP_LATENCY),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::SslLatency), HTTP_CLIENT_METRICS_SSL_LATENCY),
std::pair<int, std::string>(static_cast<int>(HttpClientMetricsType::Unknown), HTTP_CLIENT_METRICS_UNKNOWN)
};
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/MonitoringManager.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/MonitoringManager.cpp
index 7a8d3adb41..4710a87709 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/MonitoringManager.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/MonitoringManager.cpp
@@ -1,6 +1,6 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/memory/AWSMemory.h>
@@ -23,7 +23,7 @@ namespace Aws
const char MonitoringTag[] = "MonitoringAllocTag";
/**
- * Global factory to create global metrics instance.
+ * Global factory to create global metrics instance.
*/
static Aws::UniquePtr<Monitors> s_monitors;
@@ -32,7 +32,7 @@ namespace Aws
assert(s_monitors);
Aws::Vector<void*> contexts;
contexts.reserve(s_monitors->size());
- for (const auto& interface: *s_monitors)
+ for (const auto& interface: *s_monitors)
{
contexts.emplace_back(interface->OnRequestStarted(serviceName, requestName, request));
}
@@ -63,7 +63,7 @@ namespace Aws
}
}
- void OnRequestRetry(const Aws::String& serviceName, const Aws::String& requestName,
+ void OnRequestRetry(const Aws::String& serviceName, const Aws::String& requestName,
const std::shared_ptr<const Aws::Http::HttpRequest>& request, const Aws::Vector<void*>& contexts)
{
assert(s_monitors);
@@ -75,7 +75,7 @@ namespace Aws
}
}
- void OnFinish(const Aws::String& serviceName, const Aws::String& requestName,
+ void OnFinish(const Aws::String& serviceName, const Aws::String& requestName,
const std::shared_ptr<const Aws::Http::HttpRequest>& request, const Aws::Vector<void*>& contexts)
{
assert(s_monitors);
@@ -124,6 +124,6 @@ namespace Aws
s_monitors = nullptr;
}
- } // namespace Monitoring
+ } // namespace Monitoring
} // namespace Aws