public static void Finish(string pieceOfCode)
 {
     lock (_performances)
     {
         if (_performances.ContainsKey(pieceOfCode))
         {
             PerformanceInfo info = _performances[pieceOfCode];
             info.Count++;
             info.TotalTime += TimeCounter.Finish(info.Start);
         }
     }
 }
        public static void Start(string pieceOfCode)
        {
            PerformanceInfo info = null;

            lock (_performances)
            {
                if (_performances.ContainsKey(pieceOfCode))
                {
                    info = _performances[pieceOfCode];
                }
                else
                {
                    info = new PerformanceInfo(pieceOfCode);
                    _performances.Add(pieceOfCode, info);
                }

                info.Count++;
                info.Start = TimeCounter.GetStartValue();
            }
        }