public List <KeyValuePair <int, List <PerformanceTaskNameFormatted> > > GetRowLevelPerformanceTaskList() { Dictionary <int, List <PerformanceTaskNameFormatted> > aRow = new Dictionary <int, List <PerformanceTaskNameFormatted> >(); IDictionaryEnumerator enumerator = RowLevelPerformanceTasks.GetEnumerator(); int counter = 0; while (enumerator.MoveNext()) { PerformanceTaskInformation info1 = enumerator.Value as PerformanceTaskInformation; int workerRowCounter = (int)(info1.PerformanceTaskName.Split("|".ToCharArray())[1]).ParseInt(); List <PerformanceTaskNameFormatted> lst = GetList(aRow, workerRowCounter); PerformanceTaskNameFormatted tnf = new PerformanceTaskNameFormatted(workerRowCounter, counter, info1.PerformanceTaskName.Split("|".ToCharArray())[0], info1.Duration); lst.Add(tnf); if (aRow.ContainsKey(workerRowCounter)) { aRow[workerRowCounter] = lst; } else { aRow.Add(workerRowCounter, lst); } counter++; } List <KeyValuePair <int, List <PerformanceTaskNameFormatted> > > aRowList = (from r in aRow orderby r.Key select r).ToList(); return(aRowList); }
private void FormatJobPerformanceTasks(PerformanceTaskInformation info, StringBuilder sb) { if (info != null) { sb.AppendLine(string.Format("{0}:{1}", info.PerformanceTaskName.PadRight(_MaxJobPerformanceTaskNameLength, ' '), info.Duration)); } }
public void Start(string jobId, RowPerformanceTaskNames PerformanceTaskName, int position) { if (!EyediaCoreConfigurationSection.CurrentConfig.Tracking.PerformanceCounter) { return; } if (position > _MaxPerformanceTasks) { return; } PerformanceTask thePerformanceTask = GetPerformanceTask(jobId); PerformanceTaskInformation PerformanceTaskInfo = GetPerformanceTaskSubPerformanceTask(thePerformanceTask, PerformanceTaskName, position); if (PerformanceTaskInfo == null) { PerformanceTaskInfo = new PerformanceTaskInformation(PerformanceTaskName, position); thePerformanceTask.RowLevelPerformanceTasks.Add(PerformanceTaskInfo.PerformanceTaskName, PerformanceTaskInfo); PerformanceTaskInfo.Start(); } else { throw new Exception(string.Format("The PerformanceTask '{0}' has already been added", PerformanceTaskName)); } }
public void Stop(string jobId, RowPerformanceTaskNames PerformanceTaskName, int position) { if (!EyediaCoreConfigurationSection.CurrentConfig.Tracking.PerformanceCounter) { return; } PerformanceTaskInformation PerformanceTaskInfo = GetPerformanceTaskSubPerformanceTask(GetPerformanceTask(jobId), PerformanceTaskName, position); if (PerformanceTaskInfo == null) { return; } PerformanceTaskInfo.Stop(); }
public void Stop(string jobId, JobPerformanceTaskNames PerformanceTaskName) { if (!EyediaCoreConfigurationSection.CurrentConfig.Tracking.PerformanceCounter) { return; } PerformanceTask thePerformanceTask = GetPerformanceTask(jobId); PerformanceTaskInformation PerformanceTaskInfo = GetPerformanceTaskSubPerformanceTask(thePerformanceTask, PerformanceTaskName); if (PerformanceTaskInfo == null) { return; } PerformanceTaskInfo.Stop(); if (PerformanceTaskName == JobPerformanceTaskNames.WorkerFinalize) { thePerformanceTask.Stop(); } }