MCPcopy Create free account
hub / github.com/apache/impala / AssertPrometheus

Function AssertPrometheus

be/src/util/metrics-test.cc:531–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531void AssertPrometheus(const std::stringstream& val, const string& name,
532 const string& value, const string& desc, const string& kind = "") {
533 std::stringstream exp_val;
534 // convert to all values to expected format
535 exp_val << "# HELP " << name << " " << desc << "\n"
536 << "# TYPE " << name << " " << kind << "\n";
537 if (name == "impala_stats_metric" || name == "impala_histogram_metric") {
538 exp_val << value + "\n";
539 } else {
540 exp_val << name << " " << value + "\n";
541 }
542 EXPECT_EQ(val.str(), exp_val.str());
543}
544
545TEST_F(MetricsTest, CountersPrometheus) {
546 MetricGroup metrics("CounterMetrics");

Callers 1

TEST_FFunction · 0.85

Calls 1

strMethod · 0.45

Tested by

no test coverage detected