diff options
| author | prime <[email protected]> | 2022-02-10 16:46:01 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:01 +0300 | 
| commit | e34f3f0e381020a427f44fbd50463d9a04089db3 (patch) | |
| tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/monlib/encode/json | |
| parent | 3695a7cd42b74a4987d8d5a8f2e2443556998943 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/json')
| -rw-r--r-- | library/cpp/monlib/encode/json/json_encoder.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/monlib/encode/json/json_ut.cpp | 14 | ||||
| -rw-r--r-- | library/cpp/monlib/encode/json/ut/expected_buffered.json | 24 | 
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 e376cbb5645..20d2bb6283f 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 281c114a235..09e79092890 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 0441766a68e..9a6a1d6201d 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":            [ | 
