コード例 #1
0
        public static void EnableWindowsPerformanceCounters(this IBusFactoryConfigurator configurator)
        {
            if (configurator == null)
                throw new ArgumentNullException(nameof(configurator));

            var specification = new PerformanceCounterBusFactorySpecification(new WindowsCounterFactory());
            configurator.AddBusFactorySpecification(specification);
        }
コード例 #2
0
        public static void EnableStatsdPerformanceCounters(this IBusFactoryConfigurator configurator, Action<StatsDConfiguration> action)
        {
            var statsDConfiguration = StatsDConfiguration.Defaults();
            action(statsDConfiguration);

            if (configurator == null)
                throw new ArgumentNullException(nameof(configurator));

            var specification = new PerformanceCounterBusFactorySpecification(new StatsDCounterFactory(statsDConfiguration));
            configurator.AddBusFactorySpecification(specification);
        }
コード例 #3
0
        public static void EnableWindowsPerformanceCounters(this IBusFactoryConfigurator configurator)
        {
            if (configurator == null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            var specification = new PerformanceCounterBusFactorySpecification(new WindowsCounterFactory());

            configurator.AddBusFactorySpecification(specification);
        }
コード例 #4
0
        public static void EnableStatsdPerformanceCounters(this IBusFactoryConfigurator configurator, Action <StatsDConfiguration> action)
        {
            var statsDConfiguration = StatsDConfiguration.Defaults();

            action(statsDConfiguration);

            if (configurator == null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            var specification = new PerformanceCounterBusFactorySpecification(new StatsDCounterFactory(statsDConfiguration));

            configurator.AddBusFactorySpecification(specification);
        }