Lines Matching full:counter
9 #include <zephyr/net/prometheus/counter.h>
12 PROMETHEUS_COUNTER_DEFINE(test_counter_m, "Test counter",
20 * @details The test shall increment the counter value by 1 and check if the
23 * @details The test shall register the counter to the collector and check if the
24 * counter is found in the collector.
29 struct prometheus_counter *counter; in ZTEST() local
33 counter = (struct prometheus_counter *)prometheus_collector_get_metric( in ZTEST()
36 zassert_equal_ptr(counter, &test_counter_m, in ZTEST()
37 "Counter not found in collector (expected %p, got %p)", in ZTEST()
38 &test_counter_m, counter); in ZTEST()
40 zassert_equal(test_counter_m.value, 0, "Counter value is not 0"); in ZTEST()
42 ret = prometheus_counter_inc(counter); in ZTEST()
43 zassert_ok(ret, "Error incrementing counter"); in ZTEST()
45 zassert_equal(counter->value, 1, "Counter value is not 1"); in ZTEST()