aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorleonidvasilev <leonidvasilev@yandex-team.ru>2022-02-10 16:50:41 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:41 +0300
commit4d9cecd757702b2b5e853002de94e2cdbae1ca83 (patch)
treedc8dc091b00fab2f43a09c9a989cc2e1a095b4ce /library/cpp
parent8e42621c4c7f215397ef2f1e53a09366ff2634f1 (diff)
downloadydb-4d9cecd757702b2b5e853002de94e2cdbae1ca83.tar.gz
Restoring authorship annotation for <leonidvasilev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/core/process_stats.cpp30
-rw-r--r--library/cpp/actors/http/http.cpp4
-rw-r--r--library/cpp/actors/http/http.h2
-rw-r--r--library/cpp/actors/http/http_ut.cpp22
4 files changed, 29 insertions, 29 deletions
diff --git a/library/cpp/actors/core/process_stats.cpp b/library/cpp/actors/core/process_stats.cpp
index 0e1dbd0031..4eb7d7c2fc 100644
--- a/library/cpp/actors/core/process_stats.cpp
+++ b/library/cpp/actors/core/process_stats.cpp
@@ -6,7 +6,7 @@
#include <library/cpp/monlib/dynamic_counters/counters.h>
#include <library/cpp/monlib/metrics/metric_registry.h>
-#include <util/datetime/uptime.h>
+#include <util/datetime/uptime.h>
#include <util/system/defaults.h>
#include <util/stream/file.h>
#include <util/string/vector.h>
@@ -74,8 +74,8 @@ namespace NActors {
Stime /= tickPerMillisec;
CUtime /= tickPerMillisec;
CStime /= tickPerMillisec;
- SystemUptime = ::Uptime();
- Uptime = SystemUptime - TDuration::MilliSeconds(StartTime / TicksPerMillisec());
+ SystemUptime = ::Uptime();
+ Uptime = SystemUptime - TDuration::MilliSeconds(StartTime / TicksPerMillisec());
}
TFileInput statm("/proc/" + strPid + "/statm");
@@ -196,9 +196,9 @@ namespace {
SysTime = ProcStatGroup->GetCounter("Process/SystemTime", true);
MinorPageFaults = ProcStatGroup->GetCounter("Process/MinorPageFaults", true);
MajorPageFaults = ProcStatGroup->GetCounter("Process/MajorPageFaults", true);
- UptimeSeconds = ProcStatGroup->GetCounter("Process/UptimeSeconds", false);
+ UptimeSeconds = ProcStatGroup->GetCounter("Process/UptimeSeconds", false);
NumThreads = ProcStatGroup->GetCounter("Process/NumThreads", false);
- SystemUptimeSeconds = ProcStatGroup->GetCounter("System/UptimeSeconds", false);
+ SystemUptimeSeconds = ProcStatGroup->GetCounter("System/UptimeSeconds", false);
}
void UpdateCounters(const TProcStat& procStat) {
@@ -212,9 +212,9 @@ namespace {
*SysTime = procStat.Stime;
*MinorPageFaults = procStat.MinFlt;
*MajorPageFaults = procStat.MajFlt;
- *UptimeSeconds = procStat.Uptime.Seconds();
+ *UptimeSeconds = procStat.Uptime.Seconds();
*NumThreads = procStat.NumThreads;
- *SystemUptimeSeconds = procStat.Uptime.Seconds();
+ *SystemUptimeSeconds = procStat.Uptime.Seconds();
}
private:
@@ -227,9 +227,9 @@ namespace {
NMonitoring::TDynamicCounters::TCounterPtr SysTime;
NMonitoring::TDynamicCounters::TCounterPtr MinorPageFaults;
NMonitoring::TDynamicCounters::TCounterPtr MajorPageFaults;
- NMonitoring::TDynamicCounters::TCounterPtr UptimeSeconds;
+ NMonitoring::TDynamicCounters::TCounterPtr UptimeSeconds;
NMonitoring::TDynamicCounters::TCounterPtr NumThreads;
- NMonitoring::TDynamicCounters::TCounterPtr SystemUptimeSeconds;
+ NMonitoring::TDynamicCounters::TCounterPtr SystemUptimeSeconds;
};
@@ -243,9 +243,9 @@ namespace {
AnonRssSize = registry.IntGauge({{"sensor", "process.AnonRssSize"}});
FileRssSize = registry.IntGauge({{"sensor", "process.FileRssSize"}});
CGroupMemLimit = registry.IntGauge({{"sensor", "process.CGroupMemLimit"}});
- UptimeSeconds = registry.IntGauge({{"sensor", "process.UptimeSeconds"}});
+ UptimeSeconds = registry.IntGauge({{"sensor", "process.UptimeSeconds"}});
NumThreads = registry.IntGauge({{"sensor", "process.NumThreads"}});
- SystemUptimeSeconds = registry.IntGauge({{"sensor", "system.UptimeSeconds"}});
+ SystemUptimeSeconds = registry.IntGauge({{"sensor", "system.UptimeSeconds"}});
UserTime = registry.Rate({{"sensor", "process.UserTime"}});
SysTime = registry.Rate({{"sensor", "process.SystemTime"}});
@@ -258,9 +258,9 @@ namespace {
AnonRssSize->Set(procStat.AnonRss);
FileRssSize->Set(procStat.FileRss);
CGroupMemLimit->Set(procStat.CGroupMemLim);
- UptimeSeconds->Set(procStat.Uptime.Seconds());
+ UptimeSeconds->Set(procStat.Uptime.Seconds());
NumThreads->Set(procStat.NumThreads);
- SystemUptimeSeconds->Set(procStat.SystemUptime.Seconds());
+ SystemUptimeSeconds->Set(procStat.SystemUptime.Seconds());
// it is ok here to reset and add metric value, because mutation
// is performed in siglethreaded context
@@ -287,9 +287,9 @@ namespace {
NMonitoring::TRate* SysTime;
NMonitoring::TRate* MinorPageFaults;
NMonitoring::TRate* MajorPageFaults;
- NMonitoring::TIntGauge* UptimeSeconds;
+ NMonitoring::TIntGauge* UptimeSeconds;
NMonitoring::TIntGauge* NumThreads;
- NMonitoring::TIntGauge* SystemUptimeSeconds;
+ NMonitoring::TIntGauge* SystemUptimeSeconds;
};
} // namespace
diff --git a/library/cpp/actors/http/http.cpp b/library/cpp/actors/http/http.cpp
index 7125f9d8b0..ae0860e1e3 100644
--- a/library/cpp/actors/http/http.cpp
+++ b/library/cpp/actors/http/http.cpp
@@ -45,7 +45,7 @@ template <> TStringBuf THttpResponse::GetName<&THttpResponse::ContentType>() { r
template <> TStringBuf THttpResponse::GetName<&THttpResponse::ContentLength>() { return "Content-Length"; }
template <> TStringBuf THttpResponse::GetName<&THttpResponse::TransferEncoding>() { return "Transfer-Encoding"; }
template <> TStringBuf THttpResponse::GetName<&THttpResponse::LastModified>() { return "Last-Modified"; }
-template <> TStringBuf THttpResponse::GetName<&THttpResponse::ContentEncoding>() { return "Content-Encoding"; }
+template <> TStringBuf THttpResponse::GetName<&THttpResponse::ContentEncoding>() { return "Content-Encoding"; }
const TMap<TStringBuf, TStringBuf THttpResponse::*, TLessNoCase> THttpResponse::HeadersLocation = {
{ THttpResponse::GetName<&THttpResponse::Connection>(), &THttpResponse::Connection },
@@ -53,7 +53,7 @@ const TMap<TStringBuf, TStringBuf THttpResponse::*, TLessNoCase> THttpResponse::
{ THttpResponse::GetName<&THttpResponse::ContentLength>(), &THttpResponse::ContentLength },
{ THttpResponse::GetName<&THttpResponse::TransferEncoding>(), &THttpResponse::TransferEncoding },
{ THttpResponse::GetName<&THttpResponse::LastModified>(), &THttpResponse::LastModified },
- { THttpResponse::GetName<&THttpResponse::ContentEncoding>(), &THttpResponse::ContentEncoding }
+ { THttpResponse::GetName<&THttpResponse::ContentEncoding>(), &THttpResponse::ContentEncoding }
};
void THttpRequest::Clear() {
diff --git a/library/cpp/actors/http/http.h b/library/cpp/actors/http/http.h
index 96c5c1ec48..6e212500d7 100644
--- a/library/cpp/actors/http/http.h
+++ b/library/cpp/actors/http/http.h
@@ -141,7 +141,7 @@ public:
TStringBuf ContentLength;
TStringBuf TransferEncoding;
TStringBuf LastModified;
- TStringBuf ContentEncoding;
+ TStringBuf ContentEncoding;
TStringBuf Body;
diff --git a/library/cpp/actors/http/http_ut.cpp b/library/cpp/actors/http/http_ut.cpp
index 4c922f8d0f..870199ce0f 100644
--- a/library/cpp/actors/http/http_ut.cpp
+++ b/library/cpp/actors/http/http_ut.cpp
@@ -83,17 +83,17 @@ Y_UNIT_TEST_SUITE(HttpProxy) {
UNIT_ASSERT_EQUAL(response->Body, "this\r\n is test.");
}
- Y_UNIT_TEST(CreateRepsonseWithCompressedBody) {
- NHttp::THttpIncomingRequestPtr request = nullptr;
- NHttp::THttpOutgoingResponsePtr response = new NHttp::THttpOutgoingResponse(request, "HTTP", "1.1", "200", "OK");
- response->Set<&NHttp::THttpResponse::ContentEncoding>("gzip");
- TString compressedBody = "compressed body";
- response->SetBody(compressedBody);
- UNIT_ASSERT_VALUES_EQUAL("gzip", response->ContentEncoding);
- UNIT_ASSERT_VALUES_EQUAL(ToString(compressedBody.size()), response->ContentLength);
- UNIT_ASSERT_VALUES_EQUAL(compressedBody, response->Body);
- }
-
+ Y_UNIT_TEST(CreateRepsonseWithCompressedBody) {
+ NHttp::THttpIncomingRequestPtr request = nullptr;
+ NHttp::THttpOutgoingResponsePtr response = new NHttp::THttpOutgoingResponse(request, "HTTP", "1.1", "200", "OK");
+ response->Set<&NHttp::THttpResponse::ContentEncoding>("gzip");
+ TString compressedBody = "compressed body";
+ response->SetBody(compressedBody);
+ UNIT_ASSERT_VALUES_EQUAL("gzip", response->ContentEncoding);
+ UNIT_ASSERT_VALUES_EQUAL(ToString(compressedBody.size()), response->ContentLength);
+ UNIT_ASSERT_VALUES_EQUAL(compressedBody, response->Body);
+ }
+
Y_UNIT_TEST(BasicPartialParsing) {
NHttp::THttpIncomingRequestPtr request = new NHttp::THttpIncomingRequest();
EatPartialString(request, "GET /test HTTP/1.1\r\nHost: test\r\nSome-Header: 32344\r\n\r\n");