Example #1
0
        public void SetUp()
        {
            this.dimensionSet =
                new DimensionSet(new HashSet <Dimension>
            {
                new Dimension("foo"),
                new Dimension("bar"),
                new Dimension("baz"),
            });

            dimensions       = new DimensionSpecification();
            this.storagePath = Path.Combine(Environment.CurrentDirectory, "msTemp");
            if (Directory.Exists(this.storagePath))
            {
                Directory.Delete(this.storagePath, true);
            }

            Directory.CreateDirectory(this.storagePath);
            foreach (var d in this.dimensionSet.Dimensions)
            {
                dimensions[d.Name] = DimValue;
            }

            this.properties = new MockSharedDataSetProperties();
        }
        public void SetUp()
        {
            this.dimensionSet =
                new DimensionSet(new HashSet<Dimension>
                                 {
                                     new Dimension("foo"),
                                     new Dimension("bar"),
                                     new Dimension("baz"),
                                 });

            dimensions = new DimensionSpecification();
            this.storagePath = Path.Combine(Environment.CurrentDirectory, "msTemp");
            if (Directory.Exists(this.storagePath))
            {
                Directory.Delete(this.storagePath, true);
            }

            Directory.CreateDirectory(this.storagePath);
            foreach (var d in this.dimensionSet.Dimensions)
            {
                dimensions[d.Name] = DimValue;
            }

            this.properties = new MockSharedDataSetProperties();
        }
Example #3
0
        public void SetUp()
        {
            this.dimensionSet     = new DimensionSet(new HashSet <Dimension>());
            this.dimensionSpec    = new DimensionSpecification();
            this.sharedProperties = new MockSharedDataSetProperties();
            this.bucketSpan       = this.sharedProperties.CompactionConfiguration.Default.Interval;

            this.firstBucketTimestamp  = DateTime.UtcNow;
            this.secondBucketTimestamp = this.firstBucketTimestamp + this.bucketSpan;
            this.thirdBucketTimestamp  = this.secondBucketTimestamp + this.bucketSpan;
        }
Example #4
0
        public void SetUp()
        {
            this.dimensionSet = new DimensionSet(new HashSet<Dimension>());
            this.dimensionSpec = new DimensionSpecification();
            this.sharedProperties = new MockSharedDataSetProperties();
            this.bucketSpan = this.sharedProperties.CompactionConfiguration.Default.Interval;

            this.firstBucketTimestamp = DateTime.UtcNow;
            this.secondBucketTimestamp = this.firstBucketTimestamp + this.bucketSpan;
            this.thirdBucketTimestamp = this.secondBucketTimestamp + this.bucketSpan;
        }
Example #5
0
        private void InitializeDataSet(DataCompactionConfiguration compactionConfig)
        {
            compactionConfig = compactionConfig ?? this.customCompaction;
            var mockSharedProperties = new MockSharedDataSetProperties
            {
                CompactionConfiguration = compactionConfig,
                SealTime = compactionConfig.Default.Interval,
            };

            this.dataSet =
                new DataSet <InternalHitCount>(CounterName, storagePath, this.dimensionSet,
                                               mockSharedProperties);
            dataSet.LoadStoredData();
        }
Example #6
0
        public void SetUp()
        {
            this.properties = new MockSharedDataSetProperties();
            this.oneDimensionSet = new DimensionSet(new HashSet<Dimension>
                                                    {
                                                        new Dimension("one"),
                                                    });

            this.twoDimensionSet = new DimensionSet(new HashSet<Dimension>
                                                    {
                                                        new Dimension("one"),
                                                        new Dimension("two")
                                                    });
            this.timestamp = DateTime.UtcNow;
            this.currentDirectory = Directory.GetCurrentDirectory();
            this.RecreateDataBucket();

            if (File.Exists(this.bucket.Filename))
            {
                File.Delete(this.bucket.Filename);
                this.RecreateDataBucket();
            }
        }
Example #7
0
        public void SetUp()
        {
            this.properties      = new MockSharedDataSetProperties();
            this.oneDimensionSet = new DimensionSet(new HashSet <Dimension>
            {
                new Dimension("one"),
            });

            this.twoDimensionSet = new DimensionSet(new HashSet <Dimension>
            {
                new Dimension("one"),
                new Dimension("two")
            });
            this.timestamp        = DateTime.UtcNow;
            this.currentDirectory = Directory.GetCurrentDirectory();
            this.RecreateDataBucket();

            if (File.Exists(this.bucket.Filename))
            {
                File.Delete(this.bucket.Filename);
                this.RecreateDataBucket();
            }
        }
 private void InitializeDataSet(DataCompactionConfiguration compactionConfig)
 {
     compactionConfig = compactionConfig ?? this.customCompaction;
     var mockSharedProperties = new MockSharedDataSetProperties
                                {
                                    CompactionConfiguration = compactionConfig,
                                    SealTime = compactionConfig.Default.Interval,
                                };
     this.dataSet =
         new DataSet<InternalHitCount>(CounterName, storagePath, this.dimensionSet,
                                                                  mockSharedProperties);
     dataSet.LoadStoredData();
 }