mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-28 15:45:52 +00:00
Add compression and histogram metric type for Prometheus (#987)
Fixes #932 Also fixes #966 Decided not to add Summary type because it has the same functionality as Histogram but makes more calculations on client side (Clio side). See https://prometheus.io/docs/practices/histograms for detailed comparison.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <util/prometheus/Counter.h>
|
||||
|
||||
#include <boost/iostreams/device/back_inserter.hpp>
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -53,9 +54,9 @@ TEST_F(AnyCounterTests, labelsString)
|
||||
TEST_F(AnyCounterTests, serialize)
|
||||
{
|
||||
EXPECT_CALL(mockCounterImpl, value()).WillOnce(::testing::Return(42));
|
||||
std::string serialized;
|
||||
counter.serialize(serialized);
|
||||
EXPECT_EQ(serialized, R"(test_counter{label1="value1",label2="value2"} 42)");
|
||||
OStream stream{false};
|
||||
counter.serializeValue(stream);
|
||||
EXPECT_EQ(std::move(stream).data(), R"(test_counter{label1="value1",label2="value2"} 42)");
|
||||
}
|
||||
|
||||
TEST_F(AnyCounterTests, operatorAdd)
|
||||
|
||||
Reference in New Issue
Block a user