aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/src/cpp/server/load_reporter
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-03-25 12:34:53 +0300
committerheretic <heretic@yandex-team.ru>2022-03-25 12:34:53 +0300
commita41f3739eed6fceb6f62056a7620d220958a47e7 (patch)
tree278103258b510cb4a96761ea79d6ccd397ca05a0 /contrib/libs/grpc/src/cpp/server/load_reporter
parent73d3613a82e5c217fcbe0ab8bbf8120c1ed1af55 (diff)
downloadydb-a41f3739eed6fceb6f62056a7620d220958a47e7.tar.gz
Update grpc to 1.43.2 DTCC-864
ref:50a492c335cda70f458797cf945e49fe739c2715
Diffstat (limited to 'contrib/libs/grpc/src/cpp/server/load_reporter')
-rw-r--r--contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_linux.cc5
-rw-r--r--contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_windows.cc1
-rw-r--r--contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc4
-rw-r--r--contrib/libs/grpc/src/cpp/server/load_reporter/util.cc3
4 files changed, 9 insertions, 4 deletions
diff --git a/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_linux.cc b/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_linux.cc
index 561d4f5048..f778b13785 100644
--- a/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_linux.cc
+++ b/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_linux.cc
@@ -20,6 +20,8 @@
#ifdef GPR_LINUX
+#include <inttypes.h>
+
#include <cstdio>
#include "src/cpp/server/load_reporter/get_cpu_stats.h"
@@ -32,7 +34,8 @@ std::pair<uint64_t, uint64_t> GetCpuStatsImpl() {
FILE* fp;
fp = fopen("/proc/stat", "r");
uint64_t user, nice, system, idle;
- if (fscanf(fp, "cpu %lu %lu %lu %lu", &user, &nice, &system, &idle) != 4) {
+ if (fscanf(fp, "cpu %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64, &user,
+ &nice, &system, &idle) != 4) {
// Something bad happened with the information, so assume it's all invalid
user = nice = system = idle = 0;
}
diff --git a/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_windows.cc b/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_windows.cc
index 0a98e848a2..c03daddb35 100644
--- a/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_windows.cc
+++ b/contrib/libs/grpc/src/cpp/server/load_reporter/get_cpu_stats_windows.cc
@@ -21,6 +21,7 @@
#ifdef GPR_WINDOWS
#include <windows.h>
+
#include <cstdint>
#include "src/cpp/server/load_reporter/get_cpu_stats.h"
diff --git a/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc b/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc
index 16542bfddf..78e6c32864 100644
--- a/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc
+++ b/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc
@@ -18,14 +18,16 @@
#include <grpc/impl/codegen/port_platform.h>
+#include "src/cpp/server/load_reporter/load_data_store.h"
+
#include <stdio.h>
+
#include <cstdlib>
#include <set>
#include <unordered_map>
#include <vector>
#include "src/core/lib/iomgr/socket_utils.h"
-#include "src/cpp/server/load_reporter/load_data_store.h"
namespace grpc {
namespace load_reporter {
diff --git a/contrib/libs/grpc/src/cpp/server/load_reporter/util.cc b/contrib/libs/grpc/src/cpp/server/load_reporter/util.cc
index 24ad9f3f24..4b4e778a62 100644
--- a/contrib/libs/grpc/src/cpp/server/load_reporter/util.cc
+++ b/contrib/libs/grpc/src/cpp/server/load_reporter/util.cc
@@ -18,11 +18,10 @@
#include <grpc/impl/codegen/port_platform.h>
-#include <grpcpp/ext/server_load_reporting.h>
-
#include <cmath>
#include <grpc/support/log.h>
+#include <grpcpp/ext/server_load_reporting.h>
namespace grpc {
namespace load_reporter {