aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/counters
diff options
context:
space:
mode:
authorAlexander Gololobov <davenger@yandex-team.com>2022-02-10 16:47:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:38 +0300
commitfccc62e9bfdce9be2fe7e0f23479da3a5512211a (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/monlib/counters
parent39608cdb86363c75ce55b2b9a69841c3b71f22cf (diff)
downloadydb-fccc62e9bfdce9be2fe7e0f23479da3a5512211a.tar.gz
Restoring authorship annotation for Alexander Gololobov <davenger@yandex-team.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/counters')
-rw-r--r--library/cpp/monlib/counters/counters.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/monlib/counters/counters.cpp b/library/cpp/monlib/counters/counters.cpp
index 2781b8ab4e..50dca4c577 100644
--- a/library/cpp/monlib/counters/counters.cpp
+++ b/library/cpp/monlib/counters/counters.cpp
@@ -7,18 +7,18 @@ namespace NMonitoring {
unsigned i = 0;
i64 major = val;
i64 minor = 0;
- const unsigned imax = sizeof(shorts) / sizeof(char);
- for (i = 0; i < imax; i++) {
+ const unsigned imax = sizeof(shorts) / sizeof(char);
+ for (i = 0; i < imax; i++) {
if (major >> 10 == 0)
break;
else {
- minor = major - (major >> 10 << 10);
+ minor = major - (major >> 10 << 10);
major = major >> 10;
}
}
- minor = (minor * 10) >> 10;
+ minor = (minor * 10) >> 10;
- if (i == 0 || i >= imax)
+ if (i == 0 || i >= imax)
*buf = '\0';
else
snprintf(buf, size, "%" PRId64 ".%" PRId64 "%c", major, minor, shorts[i]);
@@ -28,15 +28,15 @@ namespace NMonitoring {
char* PrettyNum(i64 val, char* buf, size_t size) {
Y_ASSERT(buf);
- if (size < 4) {
- buf[0] = 0;
- return buf;
- }
+ if (size < 4) {
+ buf[0] = 0;
+ return buf;
+ }
PrettyNumShort(val, buf + 2, size - 3);
if (buf[2] == 0) {
*buf = '\0';
} else {
- size_t len = 2 + strnlen(buf + 2, size - 4);
+ size_t len = 2 + strnlen(buf + 2, size - 4);
Y_ASSERT(len < size);
buf[0] = ' ';
buf[1] = '(';