aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/json
diff options
context:
space:
mode:
authorprime <prime@yandex-team.ru>2022-02-10 16:46:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:01 +0300
commite34f3f0e381020a427f44fbd50463d9a04089db3 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/monlib/encode/json
parent3695a7cd42b74a4987d8d5a8f2e2443556998943 (diff)
downloadydb-e34f3f0e381020a427f44fbd50463d9a04089db3.tar.gz
Restoring authorship annotation for <prime@yandex-team.ru>. Commit 2 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 e376cbb564..20d2bb6283 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 281c114a23..09e7909289 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 0441766a68..9a6a1d6201 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":
[