Ejemplo n.º 1
0
 public StorageEngineDataPointWriter(
     IStorageTree storageTree,
     BucketReference bucketReference)
 {
     this.storageTree = storageTree;
     this.bucketReference = bucketReference;
 }
Ejemplo n.º 2
0
        public IEnumerable<DataPoint> GetAll(BucketReference bucket)
        {
            List<DataPoint> collection;

            return dataPoints.TryGetValue(bucket, out collection)
                       ? collection
                       : Enumerable.Empty<DataPoint>();
        }
Ejemplo n.º 3
0
        public IEnumerable<DataPoint> Get(string metricType, string id, int limit = 200)
        {
            var parsed = MetricTypeParser.Parse(metricType);
            var bucket = new BucketReference(parsed, id);

            Logger.DebugFormat("Getting Data Points for {0}, [Limit={0}]", bucket, limit);

            return dataPointCache.GetRecent(bucket, limit);
        }
Ejemplo n.º 4
0
        public MetricRoute(
            BucketReference bucketReference,
            int frequencyInSeconds,
            IAggregationStrategy aggregationStrategy)
        {
            this.aggregationStrategy = aggregationStrategy;

            Bucket = bucketReference;
            FrequencyInSeconds = frequencyInSeconds;

            Logger = NullLogger.Instance;
        }
Ejemplo n.º 5
0
 public IEnumerable<DataPoint> GetRecent(BucketReference bucket, int limit)
 {
     return GetAll(bucket).Take(limit);
 }
Ejemplo n.º 6
0
        public List<DataPoint> CreateDataPointCacheEntry(BucketReference key, DataPoint point)
        {
            Logger.DebugFormat("Creating data point cache entry for {0}", key);

            return new List<DataPoint> { point };
        }