Beispiel #1
0
 /// <summary>
 /// 性能计数开始
 /// <remarks>性能计数本身会消耗性能,在想统计性能的方法段的开始调用该方法,在末尾调用PerformanceStop()方法可输出日志,两者必须匹配</remarks>
 /// </summary>
 public static void PerformanceStart(object key)
 {
     if (key != null && !string.IsNullOrEmpty(key.ToString()))
     {
         PerformanceHelper.StartPerformance(key.ToString());
     }
 }
Beispiel #2
0
 /// <summary>
 /// 性能计数开始
 /// <remarks>性能计数本身会消耗性能,在想统计性能的方法段的开始调用该方法,在末尾调用PerformanceStop()方法可输出日志,两者必须匹配</remarks>
 /// </summary>
 public static void PerformanceStart([CallerFilePath] string filePath = "", [CallerMemberName] string methodName = "")
 {
     PerformanceHelper.StartPerformance(filePath, methodName);
 }