public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { var evaluator = s_evaluators.GetOrCreateValue(context); evaluator.Initialize(context, _profileSource); return(evaluator); }
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); } } }
public GCMeanPauseEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
public GCGenTwoGCCountEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
public GCGenTwoMeanPauseDurationEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) => new GCAllocationsEvaluator(context);
public GCCountEvaluator(PerformanceMetricEvaluationContext context) { _context = context; _context.TraceEventSource.Clr.GCStart += GCStart; }
/// <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; }
public GCPeakWorkingSetMetricEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new GCPeakWorkingSetMetricEvaluator(context)); }
public BenchmarkDurationEvaluator(PerformanceMetricEvaluationContext context) { }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new BenchmarkDurationEvaluator(context)); }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new GCPeakVirtualMemoryMetricEvaluator(context)); }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new GCTotalPauseTimeMetricEvaluator(context)); }
public GCPeakVirtualMemoryMetricEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
public GCTotalPauseTimeMetricEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
/// <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);
public GCCpuTimeInGCMetricEvaluator(PerformanceMetricEvaluationContext context) : base(context) { }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new GCCountEvaluator(context)); }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new GCGenTwoMeanPauseDurationEvaluator(context)); }
public GCAllocationsEvaluator(PerformanceMetricEvaluationContext context) { _context = context; context.TraceEventSource.Clr.GCAllocationTick += Clr_GCAllocationTick; }
public override PerformanceMetricEvaluator CreateEvaluator(PerformanceMetricEvaluationContext context) { return(new GCAllocatedBytesForCurrentThreadEvaluator()); }