aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@yandex-team.ru>2022-02-26 20:30:33 +0300
committeruzhas <uzhas@yandex-team.ru>2022-02-26 20:30:33 +0300
commita5f63ac958ea0a11ce555c369756524eca018678 (patch)
tree2719bfa0462e0de5beededf26806f34a76026aa8
parent956b478b55ae7bf4b0fbb1e0f483bcf81726023f (diff)
downloadydb-a5f63ac958ea0a11ce555c369756524eca018678.tar.gz
HTTP gateway: more metrics, rename RPS to Requests
ref:9a1f79b867e0d0dbd27b1652ee9aedf836ab337c
-rw-r--r--ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp b/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp
index a89dd1b38f..d894276833 100644
--- a/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp
+++ b/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp
@@ -95,16 +95,14 @@ public:
}
private:
static size_t
- WriteMemoryCallback(void* contents, size_t size, size_t nmemb, void* userp)
- {
+ WriteMemoryCallback(void* contents, size_t size, size_t nmemb, void* userp) {
const auto realsize = size * nmemb;
static_cast<TStringOutput*>(userp)->Write(contents, realsize);
return realsize;
};
static size_t
- ReadMemoryCallback(char *buffer, size_t size, size_t nmemb, void *userp)
- {
+ ReadMemoryCallback(char *buffer, size_t size, size_t nmemb, void *userp) {
return static_cast<TStringInput*>(userp)->Read(buffer, size * nmemb);
};
@@ -148,9 +146,11 @@ public:
const THttpGatewayConfig* httpGatewaysCfg,
NMonitoring::TDynamicCounterPtr counters)
: Counters(std::move(counters))
- , Rps(Counters->GetCounter("RPS", true))
+ , Rps(Counters->GetCounter("Requests", true))
, InFlight(Counters->GetCounter("InFlight"))
+ , MaxInFlight(Counters->GetCounter("MaxInFlight"))
, AllocatedMemory(Counters->GetCounter("AllocatedMemory"))
+ , MaxAllocatedMemory(Counters->GetCounter("MaxAllocatedMemory"))
{
if (!httpGatewaysCfg) {
return;
@@ -158,9 +158,12 @@ public:
if (httpGatewaysCfg->HasMaxInFlightCount()) {
MaxHandlers = httpGatewaysCfg->GetMaxInFlightCount();
}
+ MaxInFlight->Set(MaxHandlers);
+
if (httpGatewaysCfg->HasMaxSimulatenousDownloadsSize()) {
MaxSimulatenousDownloadsSize = httpGatewaysCfg->GetMaxSimulatenousDownloadsSize();
}
+ MaxAllocatedMemory->Set(MaxSimulatenousDownloadsSize);
TaskScheduler.Start();
}
@@ -369,7 +372,9 @@ private:
const NMonitoring::TDynamicCounterPtr Counters;
const NMonitoring::TDynamicCounters::TCounterPtr Rps;
const NMonitoring::TDynamicCounters::TCounterPtr InFlight;
+ const NMonitoring::TDynamicCounters::TCounterPtr MaxInFlight;
const NMonitoring::TDynamicCounters::TCounterPtr AllocatedMemory;
+ const NMonitoring::TDynamicCounters::TCounterPtr MaxAllocatedMemory;
TTaskScheduler TaskScheduler;
};