Skip to content

Commit 96d155a

Browse files
committed
记录更多日志
1 parent dbfc583 commit 96d155a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

samples/LoggerSample.MainApp/Program.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Diagnostics;
23
using System.Threading;
34
using System.Threading.Tasks;
45
using dotnetCampus.Logging.Attributes;
@@ -37,13 +38,14 @@ public static void Main(string[] args)
3738

3839
private static void Run()
3940
{
40-
Log.Debug("[TEST] 开始");
41+
var stopwatch = Stopwatch.StartNew();
42+
Log.Debug($"[TEST] 开始 {stopwatch.ElapsedMilliseconds}ms");
4143
Parallel.For(0, 0x00004000, i =>
4244
{
43-
Thread.Sleep(1);
45+
Thread.Sleep(0);
4446
Log.Debug($"[TEST] {DateTime.Now:HH:mm:ss}");
4547
});
46-
Log.Debug("[TEST] 完成");
48+
Log.Debug($"[TEST] 完成 {stopwatch.ElapsedMilliseconds}ms");
4749
}
4850
}
4951

0 commit comments

Comments
 (0)