Ejemplo n.º 1
0
        /// <summary>
        /// Partitions the given time period by its compaction level. The resulting
        /// sequence of compaction periods is ordered.
        /// </summary>
        public static Task <IEnumerable <FrozenPeriod> > PartitionByCompaction(
            DataConnection Connection, DateTime Start, DateTime End,
            CompactionLevel Compaction = CompactionLevel.None)
        {
            // Use '0' as a dummy sensor ID. We won't be looking at
            // the sensor's measurements, anyway.
            // TODO: maybe create a separate class for this.
            var cache = new AggregationCache(Connection, 0, Start, End);

            return(cache.PartitionByCompaction(Start, End, Compaction));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Partitions the given time period by its compaction level. The resulting
 /// sequence of compaction periods is ordered.
 /// </summary>
 public static Task<IEnumerable<FrozenPeriod>> PartitionByCompaction(
     DataConnection Connection, DateTime Start, DateTime End,
     CompactionLevel Compaction = CompactionLevel.None)
 {
     // Use '0' as a dummy sensor ID. We won't be looking at
     // the sensor's measurements, anyway.
     // TODO: maybe create a separate class for this.
     var cache = new AggregationCache(Connection, 0, Start, End);
     return cache.PartitionByCompaction(Start, End, Compaction);
 }