Examples of SamplingAggregator


Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test
  public void test_createMinAggregator()
  {
    SamplingAggregator minAggregator = AggregatorFactory.createMinAggregator(1, TimeUnit.MINUTES);

    assertThat(minAggregator.getName(), equalTo("min"));
    assertThat(minAggregator.getValue(), equalTo(1));
    assertThat(minAggregator.getUnit(), equalTo(TimeUnit.MINUTES));
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test
  public void test_createMaxAggregator()
  {
    SamplingAggregator minAggregator = AggregatorFactory.createMaxAggregator(1, TimeUnit.MINUTES);

    assertThat(minAggregator.getName(), equalTo("max"));
    assertThat(minAggregator.getValue(), equalTo(1));
    assertThat(minAggregator.getUnit(), equalTo(TimeUnit.MINUTES));
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test
  public void test_createAverageAggregator()
  {
    SamplingAggregator aggregator = AggregatorFactory.createAverageAggregator(2, TimeUnit.YEARS);

    assertThat(aggregator.getName(), equalTo("avg"));
    assertThat(aggregator.getValue(), equalTo(2));
    assertThat(aggregator.getUnit(), equalTo(TimeUnit.YEARS));
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test
  public void test_createStandardDeviationAggregator()
  {
    SamplingAggregator aggregator = AggregatorFactory.createStandardDeviationAggregator(3, TimeUnit.DAYS);

    assertThat(aggregator.getName(), equalTo("dev"));
    assertThat(aggregator.getValue(), equalTo(3));
    assertThat(aggregator.getUnit(), equalTo(TimeUnit.DAYS));
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test
  public void test_createSumAggregator()
  {
    SamplingAggregator aggregator = AggregatorFactory.createSumAggregator(3, TimeUnit.DAYS);

    assertThat(aggregator.getName(), equalTo("sum"));
    assertThat(aggregator.getValue(), equalTo(3));
    assertThat(aggregator.getUnit(), equalTo(TimeUnit.DAYS));
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test
  public void test_createCountAggregator()
  {
    SamplingAggregator aggregator = AggregatorFactory.createCountAggregator(3, TimeUnit.DAYS);

    assertThat(aggregator.getName(), equalTo("count"));
    assertThat(aggregator.getValue(), equalTo(3));
    assertThat(aggregator.getUnit(), equalTo(TimeUnit.DAYS));
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

{

  @Test(expected = NullPointerException.class)
  public void test_nullName_invalid()
  {
    new SamplingAggregator(null, 1 ,TimeUnit.DAYS);
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test(expected = IllegalArgumentException.class)
  public void test_emptyName_invalid()
  {
    new SamplingAggregator("", 1 ,TimeUnit.DAYS);
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test(expected = IllegalArgumentException.class)
  public void test_valueNegative_invalid()
  {
    new SamplingAggregator("sum", -1 ,TimeUnit.DAYS);
  }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.SamplingAggregator

  }

  @Test(expected = IllegalArgumentException.class)
  public void test_valueZero_invalid()
  {
    new SamplingAggregator("sum", 0 ,TimeUnit.DAYS);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.