Exemple #1
0
 /// <summary>
 /// Include metrics summarizing the volume of methods being compiled
 /// by the Just-In-Time compiler.
 /// </summary>
 public Builder WithJitStats()
 {
     StatsCollectors.Add(FuncWithDerivedReturnType.Create(metrics => new JitStatsCollector(metrics)));
     return(this);
 }
Exemple #2
0
 /// <summary>
 /// Include metrics around the volume of work scheduled on the worker thread pool
 /// and the scheduling delays.
 /// </summary>
 public Builder WithThreadPoolSchedulingStats()
 {
     StatsCollectors.Add(FuncWithDerivedReturnType.Create(metrics => new ThreadPoolSchedulingStatsCollector(metrics)));
     return(this);
 }
Exemple #3
0
 public Builder WithCustomCollector <TReturnType>(TReturnType statsCollector)
     where TReturnType : IEventSourceStatsCollector
 {
     StatsCollectors.Add(FuncWithDerivedReturnType.Create(_ => statsCollector));
     return(this);
 }
Exemple #4
0
 public Builder WithCustomCollector <TReturnType>(Func <IMetrics, TReturnType> func)
     where TReturnType : IEventSourceStatsCollector
 {
     StatsCollectors.Add(FuncWithDerivedReturnType.Create(func));
     return(this);
 }
Exemple #5
0
 /// <summary>
 /// Include metrics recording the frequency and duration of garbage collections/ pauses, heap sizes and
 /// volume of allocations.
 /// </summary>
 /// <param name="histogramBuckets">Buckets for the GC collection and pause histograms</param>
 public Builder WithGcStats(double[] histogramBuckets = null)
 {
     StatsCollectors.Add(FuncWithDerivedReturnType.Create(metrics => new GcStatsCollector(metrics)));
     return(this);
 }