aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2022-09-06 13:39:39 +0300
committeruzhas <uzhas@ydb.tech>2022-09-06 13:39:39 +0300
commit2af9037faec537692efae1d34591f4f346498b85 (patch)
tree928e2968b5ca0a0845acdf0113e8c2c2d1e2338d
parentd8a5855ee025759596e34fbc1362c9a50693b9df (diff)
downloadydb-2af9037faec537692efae1d34591f4f346498b85.tar.gz
set memtag in Perform thread
-rw-r--r--ydb/library/yql/providers/common/http_gateway/CMakeLists.txt1
-rw-r--r--ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/ydb/library/yql/providers/common/http_gateway/CMakeLists.txt b/ydb/library/yql/providers/common/http_gateway/CMakeLists.txt
index 3d6d3087448..c381059a0ad 100644
--- a/ydb/library/yql/providers/common/http_gateway/CMakeLists.txt
+++ b/ydb/library/yql/providers/common/http_gateway/CMakeLists.txt
@@ -16,6 +16,7 @@ target_link_libraries(providers-common-http_gateway PUBLIC
contrib-libs-cxxsupp
yutil
contrib-libs-curl
+ cpp-actors-prof
cpp-monlib-dynamic_counters
library-cpp-retry
providers-common-proto
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 c1161863042..02f701808ad 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
@@ -11,6 +11,10 @@
#include <stack>
#include <queue>
+#ifdef PROFILE_MEMORY_ALLOCATIONS
+#include <library/cpp/actors/prof/tag.h>
+#endif
+
namespace {
int curlTrace(CURL *handle, curl_infotype type,
char *data, size_t size,
@@ -497,6 +501,10 @@ private:
}
void Perform() {
+#ifdef PROFILE_MEMORY_ALLOCATIONS
+ NProfiling::SetThreadAllocTag(NProfiling::MakeTag("HTTP_PERFORM"));
+#endif
+
OutputSize.store(0ULL);
for (size_t handlers = 0U; !IsStopped;) {