Search in sources :

Example 81 with SeriesQuery

use of com.axibase.tsd.api.model.series.query.SeriesQuery in project atsd-api-test by axibase.

the class SeriesQueryTransformationsLimitTest method testAggregateAndRateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after aggregation and rate")
public void testAggregateAndRateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    AGGREGATE.setOrder(1);
    query.setAggregate(AGGREGATE);
    RATE.setOrder(2);
    query.setRate(RATE);
    checkResponse(query);
}
Also used : SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 82 with SeriesQuery

use of com.axibase.tsd.api.model.series.query.SeriesQuery in project atsd-api-test by axibase.

the class SeriesQueryTransformationsLimitTest method testAggregateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after aggregation")
public void testAggregateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setAggregate(AGGREGATE);
    checkResponse(query);
}
Also used : SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 83 with SeriesQuery

use of com.axibase.tsd.api.model.series.query.SeriesQuery in project atsd-api-test by axibase.

the class SeriesQueryTransformationsLimitTest method testGroupLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after the group transformation")
public void testGroupLimit() throws Exception {
    SeriesQuery query = new SeriesQuery("*", METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setEntities(ENTITIES);
    query.setGroup(GROUP);
    checkResponse(query);
}
Also used : SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 84 with SeriesQuery

use of com.axibase.tsd.api.model.series.query.SeriesQuery in project atsd-api-test by axibase.

the class SeriesQueryTransformationsLimitTest method testTwoIdenticalQueriesWithInterpolateLimit.

@Issue("4836")
@Test(description = "test two identical limited queries with interpolation")
public void testTwoIdenticalQueriesWithInterpolateLimit() throws Exception {
    SeriesQuery query1 = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query1.setInterpolate(INTERPOLATE);
    SeriesQuery query2 = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query2.setInterpolate(INTERPOLATE);
    checkResponse(query1, query2);
}
Also used : SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 85 with SeriesQuery

use of com.axibase.tsd.api.model.series.query.SeriesQuery in project atsd-api-test by axibase.

the class SeriesQueryTransformationsLimitTest method testInterpolateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after interpolation")
public void testInterpolateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setInterpolate(INTERPOLATE);
    checkResponse(query);
}
Also used : SeriesQuery(com.axibase.tsd.api.model.series.query.SeriesQuery) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Aggregations

SeriesQuery (com.axibase.tsd.api.model.series.query.SeriesQuery)157 Issue (io.qameta.allure.Issue)145 Test (org.testng.annotations.Test)145 Period (com.axibase.tsd.api.model.Period)43 BigDecimal (java.math.BigDecimal)43 Response (javax.ws.rs.core.Response)31 Aggregate (com.axibase.tsd.api.model.series.query.transformation.aggregate.Aggregate)26 Series (com.axibase.tsd.api.model.series.Series)23 Group (com.axibase.tsd.api.model.series.query.transformation.group.Group)20 Metric (com.axibase.tsd.api.model.metric.Metric)13 AggregationInterpolate (com.axibase.tsd.api.model.series.query.transformation.AggregationInterpolate)8 Rate (com.axibase.tsd.api.model.series.query.transformation.rate.Rate)8 Sample (com.axibase.tsd.api.model.series.Sample)7 Entity (com.axibase.tsd.api.model.entity.Entity)6 ArrayList (java.util.ArrayList)5 File (java.io.File)4 List (java.util.List)3 HashMap (java.util.HashMap)2 BaseMethod.compareJsonString (com.axibase.tsd.api.method.BaseMethod.compareJsonString)1 SeriesCheck (com.axibase.tsd.api.method.checks.SeriesCheck)1