Exemple #1
0
 public FileRecorder() : base(RecorderType.File)
 {
     m_RootDir = GPerfUtil.GeRootDir();
     if (!string.IsNullOrEmpty(m_RootDir))
     {
         string[] files = Directory.GetFiles(m_RootDir, "gperf_*.log", SearchOption.TopDirectoryOnly);
         if (files != null && files.Length > 0)
         {
             foreach (var file in files)
             {
                 File.Delete(file);
             }
         }
     }
 }
Exemple #2
0
        public LogSampler()
        {
            MetricType = SamplerMetricType.Log;
            FreqType   = SamplerFreqType.End;

            m_RootDir = GPerfUtil.GeRootDir();

            if (!string.IsNullOrEmpty(m_RootDir))
            {
                string[] files = Directory.GetFiles(m_RootDir, "log_*.log", SearchOption.TopDirectoryOnly);
                if (files != null && files.Length > 0)
                {
                    foreach (var file in files)
                    {
                        File.Delete(file);
                    }
                }
            }
        }