public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
            {
                var evaluator = s_evaluators.GetOrCreateValue(context);

                evaluator.Initialize(context, _profileSource);
                return(evaluator);
            }
Exemplo n.º 2
0
 internal void Initialize(PerformanceMetricEvaluationContext context, int profileSourceInfoID)
 {
     lock (this)
     {
         if (_context == null)
         {
             context.TraceEventSource.Kernel.PerfInfoCollectionStart += PerfInfoCollectionStart;
             context.TraceEventSource.Kernel.PerfInfoPMCSample       += PerfInfoPMCSample;
             _context       = context;
             _profileSource = profileSourceInfoID;
         }
         else
         {
             Debug.Assert(_context == context);
             Debug.Assert(_profileSource == profileSourceInfoID);
         }
     }
 }
 internal void Initialize(PerformanceMetricEvaluationContext context, int profileSource)
 {
     lock (this)
     {
         if (_context == null)
         {
             context.TraceEventSource.Kernel.PerfInfoCollectionStart += PerfInfoCollectionStart;
             context.TraceEventSource.Kernel.PerfInfoPMCSample       += PerfInfoPMCSample;
             _context       = context;
             _profileSource = profileSource;
         }
         else
         {
             // FIXME: We should fail here instead.
             Debug.Assert(_context == context);
             Debug.Assert(_profileSource == profileSource);
         }
     }
 }
Exemplo n.º 4
0
 public GCMeanPauseEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
Exemplo n.º 5
0
 public GCGenTwoGCCountEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
Exemplo n.º 6
0
 public GCGenTwoMeanPauseDurationEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
Exemplo n.º 7
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) => new GCAllocationsEvaluator(context);
 public GCCountEvaluator(PerformanceMetricEvaluationContext context)
 {
     _context = context;
     _context.TraceEventSource.Clr.GCStart += GCStart;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Constructs a new GCEvaluator and sets its content to the given PerformanceMetricEvaluationContext.
 /// </summary>
 /// <param name="context">The context received from the test framework</param>
 public GCEvaluator(PerformanceMetricEvaluationContext context)
 {
     Debug.Assert(context.TraceEventSource is TraceEventDispatcher);
     _context = context;
 }
Exemplo n.º 10
0
 public GCPeakWorkingSetMetricEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
Exemplo n.º 11
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new GCPeakWorkingSetMetricEvaluator(context));
 }
Exemplo n.º 12
0
 public BenchmarkDurationEvaluator(PerformanceMetricEvaluationContext context)
 {
 }
Exemplo n.º 13
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new BenchmarkDurationEvaluator(context));
 }
Exemplo n.º 14
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new GCPeakVirtualMemoryMetricEvaluator(context));
 }
Exemplo n.º 15
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new GCTotalPauseTimeMetricEvaluator(context));
 }
Exemplo n.º 16
0
 public GCPeakVirtualMemoryMetricEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
Exemplo n.º 17
0
 public GCTotalPauseTimeMetricEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
Exemplo n.º 18
0
 /// <summary>
 /// Constructs a new PerformanceMetricEvaluator for this metric. Implementors of a custom metric must override
 /// this method and instruct it to instantiate the GCEvaluator for that custom metric.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public abstract override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context);
Exemplo n.º 19
0
 public GCCpuTimeInGCMetricEvaluator(PerformanceMetricEvaluationContext context)
     : base(context)
 {
 }
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new GCCountEvaluator(context));
 }
Exemplo n.º 21
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new GCGenTwoMeanPauseDurationEvaluator(context));
 }
Exemplo n.º 22
0
 public GCAllocationsEvaluator(PerformanceMetricEvaluationContext context)
 {
     _context = context;
     context.TraceEventSource.Clr.GCAllocationTick += Clr_GCAllocationTick;
 }
Exemplo n.º 23
0
 public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context)
 {
     return(new GCAllocatedBytesForCurrentThreadEvaluator());
 }