@@ -61,6 +61,7 @@ public function itShouldSaveCountersInRedis()
6161 $ metric = $ registry ->registerCounter ('test ' , 'some_metric ' , 'this is for testing ' , array ('foo ' , 'bar ' ));
6262 $ metric ->incBy (2 , array ('lalal ' , 'lululu ' ));
6363 $ registry ->getCounter ('test ' , 'some_metric ' , array ('foo ' , 'bar ' ))->inc (array ('lalal ' , 'lululu ' ));
64+ $ registry ->getCounter ('test ' , 'some_metric ' , array ('foo ' , 'bar ' ))->inc (array ('lalal ' , 'lvlvlv ' ));
6465
6566 $ registry = new CollectorRegistry ($ this ->newRedisAdapter ());
6667 $ this ->assertThat (
@@ -69,6 +70,7 @@ public function itShouldSaveCountersInRedis()
6970# HELP test_some_metric this is for testing
7071# TYPE test_some_metric counter
7172test_some_metric{foo="lalal",bar="lululu"} 3
73+ test_some_metric{foo="lalal",bar="lvlvlv"} 1
7274
7375EOF
7476 )
@@ -83,6 +85,7 @@ public function itShouldSaveHistogramsInRedis()
8385 $ registry = new CollectorRegistry ($ this ->redisAdapter );
8486 $ metric = $ registry ->registerHistogram ('test ' , 'some_metric ' , 'this is for testing ' , array ('foo ' , 'bar ' ), array (0.1 , 1 , 5 , 10 ));
8587 $ metric ->observe (2 , array ('lalal ' , 'lululu ' ));
88+ $ registry ->getHistogram ('test ' , 'some_metric ' , array ('foo ' , 'bar ' ))->observe (7.1 , array ('lalal ' , 'lvlvlv ' ));
8689 $ registry ->getHistogram ('test ' , 'some_metric ' , array ('foo ' , 'bar ' ))->observe (13 , array ('lalal ' , 'lululu ' ));
8790 $ registry ->getHistogram ('test ' , 'some_metric ' , array ('foo ' , 'bar ' ))->observe (7.1 , array ('lalal ' , 'lululu ' ));
8891 $ registry ->getHistogram ('test ' , 'some_metric ' , array ('foo ' , 'bar ' ))->observe (7.1 , array ('gnaaha ' , 'hihihi ' ));
@@ -107,6 +110,13 @@ public function itShouldSaveHistogramsInRedis()
107110test_some_metric_bucket{foo="lalal",bar="lululu",le="+Inf"} 3
108111test_some_metric_count{foo="lalal",bar="lululu"} 3
109112test_some_metric_sum{foo="lalal",bar="lululu"} 22.1
113+ test_some_metric_bucket{foo="lalal",bar="lvlvlv",le="0.1"} 0
114+ test_some_metric_bucket{foo="lalal",bar="lvlvlv",le="1"} 0
115+ test_some_metric_bucket{foo="lalal",bar="lvlvlv",le="5"} 0
116+ test_some_metric_bucket{foo="lalal",bar="lvlvlv",le="10"} 1
117+ test_some_metric_bucket{foo="lalal",bar="lvlvlv",le="+Inf"} 1
118+ test_some_metric_count{foo="lalal",bar="lvlvlv"} 1
119+ test_some_metric_sum{foo="lalal",bar="lvlvlv"} 7.1
110120
111121EOF
112122 )
0 commit comments