コード例 #1
0
 @Test
 public void toInfluxFormat() throws Exception {
   InfluxMetric metric =
       new InfluxMetric(
           "foo",
           Arrays.asList(new InfluxTag("tag", "value"), new InfluxTag("tag2", "value2")),
           1.0,
           2123l);
   assertThat(metric.toInfluxFormat(), equalTo("foo,tag=value,tag2=value2 value=1.0 2123"));
 }
コード例 #2
0
 @Test
 public void toInfluxFormatInteger() throws Exception {
   InfluxMetric metric = new InfluxMetric("foo", EMPTY_TAG_LIST, 1, 2123l);
   assertThat(metric.toInfluxFormat(), equalTo("foo value=1i 2123"));
 }