/// <summary> /// Initializes a new instance of the <see cref="AbstractPipelineRunner{T, K}"/> class. /// </summary> /// <param name="tasks">The tasks.</param> protected AbstractPipelineRunner(IEnumerable <K> tasks) { //Tasks = tasks.Reverse().ToArray(); Tasks = tasks; K previous = null; K first = null; foreach (var current in tasks) { if (first == null) { first = current; } if (previous == null) { previous = current; } else { previous.SetNext(args => current.Execute(args)); previous = current; } } Profiler = NullProfiler.Instance; if (first != null) { _excuteTasks = (args) => first.Execute(args); } }
public StopwatchPerformanceMarker(IPerformanceProfiler profiler, string id, string name, DateTime timestamp, string requestId, string sessionId, PerformanceMarkerArea area = PerformanceMarkerArea.Unknown, string tag = null) : base(id, name, timestamp, requestId, sessionId, area, tag) { if (profiler == null) { throw new ArgumentNullException("profiler"); } _profiler = profiler; _stopwatch = Stopwatch.StartNew(); }
/// <summary> /// Initializes a new instance of the <see cref="AbstractPipelineRunner{T, K}"/> class. /// </summary> /// <param name="tasks">The tasks.</param> public AbstractPipelineRunner(IEnumerable <K> tasks) { //Tasks = tasks.Reverse().ToArray(); Tasks = tasks; foreach (var task in tasks.Reverse()) { _excuteTasks = CreateTaskExpression(task); } Profiler = new NullProfiler(); }
public CanvasViewModel( ILogger logger, IScenePersistenceService scenePersistenceService, IPerformanceProfiler performanceProfiler, IScene2D scene, IBitmapSource bitmapSource, IDispatcherWrapper dispatcherWrapper) { _logger = logger; _scenePersistenceService = scenePersistenceService; _performanceProfiler = performanceProfiler; _scene = scene; _bitmapSource = bitmapSource; _dispatcherWrapper = dispatcherWrapper; }
public MainWindowViewModel( ILogger logger, IPerformanceProfiler performanceProfiler, IWindowAppearanceService windowAppearanceService, ICanvasViewModel canvasViewModel, ICanvasViewModel3d canvasViewModel3d, ILogConsoleViewModel logConsoleViewModel) { _logger = logger; _performanceProfiler = performanceProfiler; _windowAppearanceService = windowAppearanceService; _canvasViewModel3d = canvasViewModel3d; Canvas = canvasViewModel; Canvas3d = canvasViewModel3d; LogConsole = logConsoleViewModel; }
/// <summary> /// Initializes a new instance of the <see cref="AbstractPipelineRunner{T, K}"/> class. /// </summary> /// <param name="tasks">The tasks.</param> protected AbstractPipelineRunner(IEnumerable <K> tasks) { //Tasks = tasks.Reverse().ToArray(); if (tasks != null) { Tasks = tasks; foreach (var task in Tasks.Reverse()) { _excuteTasks = CreateTaskExpression(task); } } Profiler = new NullProfiler(); }
/// <summary> /// Initializes a new instance of the <see cref="Profiler"/> class. /// </summary> /// <param name="performanceProfilers">The performanceProfilers.</param> public Profiler(IPerformanceProfiler[] performanceProfilers) { _performanceProfilers = performanceProfilers; }
/// <summary> /// Initializes a new instance of the <see cref="ProfilingContext"/> class. /// </summary> /// <param name="key">The key.</param> /// <param name="performanceProfilers">The performance profilers.</param> public ProfilingContext(string key, IPerformanceProfiler[] performanceProfilers) { _key = key; _performanceProfilers = performanceProfilers; if (_performanceProfilers == null || _performanceProfilers.Length == 0) return; foreach (var profiler in _performanceProfilers) { profiler.BeginSession(key); } }
/// <summary> /// Initializes a new instance of the <see cref="AbstractPipelineRunner{T, K}"/> class. /// </summary> /// <param name="tasks">The tasks.</param> public AbstractPipelineRunner(IEnumerable <K> tasks) { _tasks = tasks; Profiler = new NullProfiler(); }
public PerformanceProfileTest(IPerformanceProfiler performanceProfiler) { this._performanceProfiler = performanceProfiler; }