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); } } } }
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); } } } }