File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,25 @@ def retry_condition(r):
259259 assert len (metric_query_tuple ["series" ][0 ]["pointlist" ]) == 1
260260 assert metric_query_tuple ["series" ][0 ]["pointlist" ][0 ][1 ] == 1
261261
262+ def test_distribution_metrics (self ):
263+ now = datetime .datetime .now ()
264+ now_ts = int (time .mktime (now .timetuple ()))
265+ metric_name = "test.distribution_metric." + str (now_ts )
266+ host_name = "test.host." + str (now_ts )
267+
268+ # Send metrics with single and multi points, and with compression
269+ assert dog .Distribution .send (
270+ distributions = [{
271+ 'metric' : metric_name ,
272+ 'points' : [(now_ts - 60 , [1.0 ])],
273+ 'type' : 'distribution' ,
274+ 'host' : host_name ,
275+ }]
276+ )["status" ] == "ok"
277+
278+ # FIXME: Query and verify the test metric result. Currently, it takes
279+ # too long for a new distribution metric to become available for query.
280+
262281 def test_graph_snapshot (self ):
263282 metric_query = "system.load.1{*}"
264283 event_query = "*"
You can’t perform that action at this time.
0 commit comments