public void Log(IPerformanceMarker marker) { _logger.Log(marker); IPerformanceAggregate ag = GetPerformanceAggregate(); if (ag != null) { ag.AppendMarker(marker); } }
public void PerformanceAggregate(IPerformanceAggregate aggregate, TimeSpan totalElapsedTime) { if (aggregate == null) { return; } PerformanceAggregate( aggregate.FirstTimestamp, totalElapsedTime.TotalMilliseconds, aggregate.RequestId ?? string.Empty, aggregate.SessionId ?? string.Empty, aggregate.AggregatesInMilliseconds[(int)PerformanceMarkerArea.Unknown], aggregate.AggregatesInMilliseconds[(int)PerformanceMarkerArea.Crm], aggregate.AggregatesInMilliseconds[(int)PerformanceMarkerArea.Cms], aggregate.AggregatesInMilliseconds[(int)PerformanceMarkerArea.Liquid], aggregate.AggregatesInMilliseconds[(int)PerformanceMarkerArea.Security], this.PortalUrl, this.PortalVersion, this.ProductionOrTrial); }
static public IPerformanceAggregate GetPerformanceAggregate() { IPerformanceAggregate ag = null; var context = HttpContext.Current; if (context == null) { return(null); } if (context.Items.Contains(AggregatorKey)) { ag = context.Items[AggregatorKey] as IPerformanceAggregate; } else { ag = new PerformanceAggregate(); context.Items.Add(AggregatorKey, ag); } return(ag); }