Describes a routine and collects performance statistics about it.
Ejemplo n.º 1
0
        private void BumpHitCount()
        {
            if (meterRunning)
            {
                ProfiledRoutine rec = GetRoutineRecord();

                rec.HitCount++;
            }
        }
Ejemplo n.º 2
0
        private void BillCurrentRoutine(long elapsedCycles, TimeSpan elapsedTime)
        {
            if (meterRunning)
            {
                ProfiledRoutine rec = GetRoutineRecord();

                rec.Cycles += elapsedCycles;
                rec.Time   += elapsedTime;
            }
        }
Ejemplo n.º 3
0
        private ProfiledRoutine GetRoutineRecord()
        {
            ProfiledRoutine rec;

            if (dict.TryGetValue(currentRoutine, out rec) == false)
            {
                rec = new ProfiledRoutine(currentRoutine);
                dict.Add(currentRoutine, rec);

                SymbolInfo info;
                if (symbols != null && symbols.TryGetValue(currentRoutine, out info))
                {
                    rec.Name        = info.Name;
                    rec.Source      = info.Source;
                    rec.Description = info.Description;
                }
            }
            return(rec);
        }
Ejemplo n.º 4
0
        private ProfiledRoutine GetRoutineRecord()
        {
            ProfiledRoutine rec;
            if (dict.TryGetValue(currentRoutine, out rec) == false)
            {
                rec = new ProfiledRoutine(currentRoutine);
                dict.Add(currentRoutine, rec);

                SymbolInfo info;
                if (symbols != null && symbols.TryGetValue(currentRoutine, out info))
                {
                    rec.Name = info.Name;
                    rec.Source = info.Source;
                    rec.Description = info.Description;
                }
            }
            return rec;
        }