public TrackPerformanceFilter(IPerformanceLogService logService, IOptionsMonitor <ColidStatisticsLogOptions> optionsAccessor, IServiceProvider provider) { _logService = logService; _product = optionsAccessor.CurrentValue.ProductName; _layer = optionsAccessor.CurrentValue.LayerName; _provider = provider; }
public PerfTracker(IPerformanceLogService logService, LogEntry details) { _logService = logService; _sw = Stopwatch.StartNew(); _infoToLog = details; var beginTime = DateTime.Now; if (_infoToLog.AdditionalInfo == null) { _infoToLog.AdditionalInfo = new Dictionary <string, object>() { { "Started", beginTime.ToString(CultureInfo.InvariantCulture) } } } ; else { _infoToLog.AdditionalInfo.Add( "Started", beginTime.ToString(CultureInfo.InvariantCulture)); } }