aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/json
diff options
context:
space:
mode:
authorprime <prime@yandex-team.ru>2022-02-10 16:46:00 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:00 +0300
commit3695a7cd42b74a4987d8d5a8f2e2443556998943 (patch)
treeee79ee9294a61ee00e647684b3700d0a87e102a3 /library/cpp/monlib/encode/json
parent4d8b546b89b5afc08cf3667e176271c7ba935f33 (diff)
downloadydb-3695a7cd42b74a4987d8d5a8f2e2443556998943.tar.gz
Restoring authorship annotation for <prime@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/json')
-rw-r--r--library/cpp/monlib/encode/json/json_encoder.cpp10
-rw-r--r--library/cpp/monlib/encode/json/json_ut.cpp14
-rw-r--r--library/cpp/monlib/encode/json/ut/expected_buffered.json24
3 files changed, 24 insertions, 24 deletions
diff --git a/library/cpp/monlib/encode/json/json_encoder.cpp b/library/cpp/monlib/encode/json/json_encoder.cpp
index 20d2bb6283f..e376cbb5645 100644
--- a/library/cpp/monlib/encode/json/json_encoder.cpp
+++ b/library/cpp/monlib/encode/json/json_encoder.cpp
@@ -440,11 +440,11 @@ namespace NMonitoring {
EmptyLabels_ = false;
}
- void OnLabel(ui32 name, ui32 value) override {
- TBufferedEncoderBase::OnLabel(name, value);
- EmptyLabels_ = false;
- }
-
+ void OnLabel(ui32 name, ui32 value) override {
+ TBufferedEncoderBase::OnLabel(name, value);
+ EmptyLabels_ = false;
+ }
+
void OnLabelsEnd() override {
TBufferedEncoderBase::OnLabelsEnd();
Y_ENSURE(!EmptyLabels_, "Labels cannot be empty");
diff --git a/library/cpp/monlib/encode/json/json_ut.cpp b/library/cpp/monlib/encode/json/json_ut.cpp
index 09e79092890..281c114a235 100644
--- a/library/cpp/monlib/encode/json/json_ut.cpp
+++ b/library/cpp/monlib/encode/json/json_ut.cpp
@@ -225,14 +225,14 @@ Y_UNIT_TEST_SUITE(TJsonTest) {
e->Close();
json += "\n";
- auto parseJson = [] (auto buf) {
- NJson::TJsonValue value;
- NJson::ReadJsonTree(buf, &value, true);
- return value;
- };
-
+ auto parseJson = [] (auto buf) {
+ NJson::TJsonValue value;
+ NJson::ReadJsonTree(buf, &value, true);
+ return value;
+ };
+
const auto expectedJson = NResource::Find(expectedResourceKey);
- UNIT_ASSERT_EQUAL(parseJson(json), parseJson(expectedJson));
+ UNIT_ASSERT_EQUAL(parseJson(json), parseJson(expectedJson));
};
check(false, false, "/expected.json");
diff --git a/library/cpp/monlib/encode/json/ut/expected_buffered.json b/library/cpp/monlib/encode/json/ut/expected_buffered.json
index 9a6a1d6201d..0441766a68e 100644
--- a/library/cpp/monlib/encode/json/ut/expected_buffered.json
+++ b/library/cpp/monlib/encode/json/ut/expected_buffered.json
@@ -10,8 +10,8 @@
"kind":"COUNTER",
"labels":
{
- "labels":"l1",
- "metric":"single"
+ "labels":"l1",
+ "metric":"single"
},
"ts":1509843723,
"value":17
@@ -20,8 +20,8 @@
"kind":"RATE",
"labels":
{
- "labels":"l2",
- "metric":"single"
+ "labels":"l2",
+ "metric":"single"
},
"ts":1509843723,
"value":17
@@ -30,8 +30,8 @@
"kind":"GAUGE",
"labels":
{
- "labels":"l3",
- "metric":"single"
+ "labels":"l3",
+ "metric":"single"
},
"ts":1509843723,
"value":3.14
@@ -40,8 +40,8 @@
"kind":"IGAUGE",
"labels":
{
- "labels":"l4",
- "metric":"single_igauge"
+ "labels":"l4",
+ "metric":"single_igauge"
},
"ts":1509843723,
"value":42
@@ -50,8 +50,8 @@
"kind":"GAUGE",
"labels":
{
- "labels":"l5",
- "metric":"multiple"
+ "labels":"l5",
+ "metric":"multiple"
},
"timeseries":
[
@@ -73,8 +73,8 @@
"kind":"COUNTER",
"labels":
{
- "labels":"l6",
- "metric":"multiple"
+ "labels":"l6",
+ "metric":"multiple"
},
"timeseries":
[