Beispiel #1
0
            /// <summary>
            /// Finishes configuration and starts collecting .NET runtime metrics. Returns a <see cref="IDisposable"/> that
            /// can be disposed of to stop metric collection.
            /// </summary>
            /// <returns></returns>
            public DotNetRuntimeStatsCollector StartCollecting()
            {
                var runtimeStatsCollector = new DotNetRuntimeStatsCollector(StatsCollectors.ToImmutableHashSet(), _errorHandler, _debugMetrics, _metrics);

                runtimeStatsCollector.RegisterMetrics(_metrics);
                return(runtimeStatsCollector);
            }
Beispiel #2
0
            /// <summary>
            /// Finishes configuration and starts collecting .NET runtime metrics. Returns a <see cref="IDisposable"/> that
            /// can be disposed of to stop metric collection.
            /// </summary>
            /// <returns></returns>
            public DotNetRuntimeStatsCollector StartCollecting(IMetrics metrics)
            {
                var runtimeStatsCollector = new DotNetRuntimeStatsCollector(StatsCollectors.Select(sc => sc.Function(metrics)).ToImmutableHashSet(), _errorHandler, _debugMetrics, metrics);

                runtimeStatsCollector.RegisterMetrics();
                return(runtimeStatsCollector);
            }