use of org.ff4j.audit.chart.TimeSeriesChart in project ff4j by ff4j.
the class EventRepositorySpringJdbc method getFeatureUsageHistory.
/**
* {@inheritDoc}
*/
@Override
public TimeSeriesChart getFeatureUsageHistory(EventQueryDefinition query, TimeUnit units) {
// Create the interval depending on units
TimeSeriesChart tsc = new TimeSeriesChart(query.getFrom(), query.getTo(), units);
// Search All events
Iterator<Event> iterEvent = searchFeatureUsageEvents(query).iterator();
// Dispatch events into time slots
while (iterEvent.hasNext()) {
tsc.addEvent(iterEvent.next());
}
return tsc;
}
Aggregations