Esempio n. 1
0
        public MetricAggregator(StatsifyAggregatorConfigurationSection configuration, IDatapointDatabaseResolver datapointDatabaseResolver, ManualResetEvent stopEvent)
        {
            this.configuration             = configuration;
            this.datapointDatabaseResolver = datapointDatabaseResolver;
            this.stopEvent = stopEvent;
            flushInterval  = (float)configuration.Storage.FlushInterval.TotalMilliseconds;

            metricsBuffer = new MetricsBuffer();

            var flushThread = new Thread(FlushCallback);

            flushThread.Start();
        }
Esempio n. 2
0
        public StatsifyAggregatorService(HostSettings hostSettings, ConfigurationManager configurationManager)
        {
            stopEvent     = new ManualResetEvent(false);
            configuration = configurationManager.Configuration;
            var datapointDatabaseResolver = new DatapointDatabaseResolverCachingWrapper(new DatapointDatabaseResolver(configuration));

            metricAggregator     = new MetricAggregator(configuration, datapointDatabaseResolver, stopEvent);
            annotationAggregator = new AnnotationAggregator(configuration);

            datagramParser = new DatagramParser(new MetricParser());

            var relativeUrl = configuration.HttpEndpoint.RelativeUrl;

            if (!relativeUrl.EndsWith("/"))
            {
                relativeUrl += "/";
            }

            var uriBuilder = new UriBuilder("http", configuration.HttpEndpoint.Address, configuration.HttpEndpoint.Port, relativeUrl);

            uri = uriBuilder.Uri;

            log.Info("initializing with Http Endpoint Url '{0}'", uri);
        }
Esempio n. 3
0
 public DatapointDatabaseResolver(StatsifyAggregatorConfigurationSection configuration)
 {
     this.configuration = configuration;
 }
Esempio n. 4
0
 public AnnotationService(StatsifyAggregatorConfigurationSection statsifyConfiguration)
 {
     path = statsifyConfiguration.Storage.Path;
 }
Esempio n. 5
0
 public AnnotationAggregator(StatsifyAggregatorConfigurationSection configuration)
 {
     path = Path.Combine(configuration.Storage.Path, "annotations.db");
 }
Esempio n. 6
0
 public MetricService(StatsifyAggregatorConfigurationSection configurationSection)
 {
     this.rootDirectory = new DirectoryInfo(configurationSection.Storage.Path);
 }