use of com.axibase.tsd.api.model.series.query.transformation.group.GroupType in project atsd-api-test by axibase.
the class SeriesQueryTransformationWithDifferentForecastTest method generateGroupingSet.
private List<Group> generateGroupingSet() {
List<Group> groups = new ArrayList<>();
List<List<GroupType>> setsGroupType = Arrays.asList(Arrays.asList(GroupType.AVG, GroupType.SUM), Arrays.asList(GroupType.AVG, GroupType.SUM, GroupType.DETAIL));
Period period = new Period(GROUP_PERIOD_COUNT, TimeUnit.MINUTE, PeriodAlignment.START_TIME);
AggregationInterpolate interp = new AggregationInterpolate(AggregationInterpolateType.LINEAR, true);
for (List<GroupType> setGroupType : setsGroupType) {
groups.add(new Group().setPeriod(period).setInterpolate(interp).setTypes(setGroupType));
}
return groups;
}
use of com.axibase.tsd.api.model.series.query.transformation.group.GroupType in project atsd-api-test by axibase.
the class TransformationPermutationsTest method setUpGrouping.
private void setUpGrouping() {
Period period = new Period(5, TimeUnit.MINUTE, PeriodAlignment.START_TIME);
List<GroupType> aggregationFunctions = Arrays.asList(GroupType.FIRST, GroupType.SUM);
AggregationInterpolate interp = new AggregationInterpolate(AggregationInterpolateType.LINEAR, true);
groupSettings = new Group().setPeriod(period).setTypes(aggregationFunctions).setInterpolate(interp);
query.setGroup(groupSettings);
}
use of com.axibase.tsd.api.model.series.query.transformation.group.GroupType in project atsd-api-test by axibase.
the class SeriesSign method of.
public static SeriesSign of(Series series) {
String entity = series.getEntity();
Map<String, String> tags = series.getTags();
String side = tags == null ? null : tags.get("side");
Aggregate aggregate = series.getAggregate();
AggregationType aggregationType = aggregate == null ? null : aggregate.getType();
SeriesGroupInfo group = series.getGroup();
GroupType groupType = group == null ? null : group.getType();
return new SeriesSign(entity, side, aggregationType, groupType);
}
Aggregations