Search in sources :

Example 76 with SeriesQuery

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

the class SeriesQueryTransformationsLimitTest method testInterpolateAndRateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after interpolation and rate calculation")
public void testInterpolateAndRateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setInterpolate(INTERPOLATE);
    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 77 with SeriesQuery

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

the class SeriesQueryTransformationsLimitTest method testRateAndGroupLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after rate calculation and grouping")
public void testRateAndGroupLimit() throws Exception {
    SeriesQuery query = new SeriesQuery("*", METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setEntities(ENTITIES);
    RATE.setOrder(1);
    query.setRate(RATE);
    GROUP.setOrder(2);
    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 78 with SeriesQuery

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

the class SeriesQueryTransformationsLimitTest method testInterpolateAndAggregateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after interpolation and aggregation")
public void testInterpolateAndAggregateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setInterpolate(INTERPOLATE);
    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 79 with SeriesQuery

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

the class SeriesQueryTransformationsLimitTest method testInterpolateGroupAggregateRateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after interpolation and all permutations of grouping, aggregation, and rate")
public void testInterpolateGroupAggregateRateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery("*", METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    query.setEntities(ENTITIES);
    query.setInterpolate(INTERPOLATE);
    for (int i = 1; i <= 3; i++) {
        for (int j = 1; j <= 3; j++) {
            for (int k = 1; k < 3; k++) {
                if (i != j && j != k && k != i) {
                    GROUP.setOrder(i);
                    query.setGroup(GROUP);
                    AGGREGATE.setOrder(j);
                    query.setAggregate(AGGREGATE);
                    RATE.setOrder(k);
                    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 80 with SeriesQuery

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

the class SeriesQueryTransformationsLimitTest method testRateAndAggregateLimit.

@Issue("4835")
@Test(description = "test that limit is applied correctly after rate calculation and aggregation")
public void testRateAndAggregateLimit() throws Exception {
    SeriesQuery query = new SeriesQuery(ENTITY_1, METRIC, "2017-01-01T00:00:00Z", "2017-01-01T02:00:00Z");
    RATE.setOrder(1);
    query.setRate(RATE);
    AGGREGATE.setOrder(2);
    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)

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