示例#1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="DefaultMetrics" /> class.
 /// </summary>
 /// <param name="clock">The clock.</param>
 /// <param name="filter">The metrics filter.</param>
 /// <param name="measureMetricsProvider">The factory used to provide access to metric managers.</param>
 /// <param name="metricsBuilder">The factory used to provide access to metric builders.</param>
 /// <param name="metricsProvider">The metrics advanced manager factory.</param>
 /// <param name="dataManager">The data manager.</param>
 /// <param name="metricsManager">The metrics manager.</param>
 public DefaultMetrics(
     IClock clock,
     IFilterMetrics filter,
     IMeasureMetrics measureMetricsProvider,
     IBuildMetrics metricsBuilder,
     IProvideMetrics metricsProvider,
     IProvideMetricValues dataManager,
     IManageMetrics metricsManager)
 {
     Clock    = clock ?? new StopwatchClock();
     Filter   = filter ?? new NullMetricsFilter();
     Measure  = measureMetricsProvider;
     Build    = metricsBuilder;
     Snapshot = dataManager;
     Provider = metricsProvider;
     Manage   = metricsManager;
 }
示例#2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="DefaultMetrics" /> class.
 /// </summary>
 /// <param name="clock">The clock.</param>
 /// <param name="globalFilter">The global filter.</param>
 /// <param name="measureMetricsProvider">The factory used to provide access to metric managers.</param>
 /// <param name="metricsBuilder">The factory used to provide access to metric builders.</param>
 /// <param name="metricsProvider">The metrics advanced manager factory.</param>
 /// <param name="dataManager">The data manager.</param>
 /// <param name="metricsManager">The metrics manager.</param>
 /// <param name="healthProvider">The health status provider.</param>
 public DefaultMetrics(
     IClock clock,
     IFilterMetrics globalFilter,
     IMeasureMetrics measureMetricsProvider,
     IBuildMetrics metricsBuilder,
     IProvideMetrics metricsProvider,
     IProvideMetricValues dataManager,
     IManageMetrics metricsManager,
     IProvideHealth healthProvider)
 {
     Clock        = clock ?? new StopwatchClock();
     GlobalFilter = globalFilter ?? new NoOpMetricsFilter();
     Measure      = measureMetricsProvider;
     Build        = metricsBuilder;
     Snapshot     = dataManager;
     Provider     = metricsProvider;
     Manage       = metricsManager;
     Health       = healthProvider;
 }