|
|
|
@ -3,6 +3,7 @@ using Shentun.Peis.GuideTypes; |
|
|
|
using Shentun.Peis.Models; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
@ -50,15 +51,25 @@ namespace Shentun.Peis |
|
|
|
[Fact] |
|
|
|
public async Task GetByCodeAllAsync() |
|
|
|
{ |
|
|
|
|
|
|
|
var list = await _appService.GetByCodeAllAsync("",0); |
|
|
|
foreach (var item in list) |
|
|
|
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) |
|
|
|
{ |
|
|
|
_output.WriteLine(item.DisplayName); |
|
|
|
Stopwatch stopwatch = new Stopwatch(); |
|
|
|
stopwatch.Start(); |
|
|
|
var list = await _appService.GetByCodeAllAsync("", 0); |
|
|
|
stopwatch.Stop(); |
|
|
|
TimeSpan elapsed = stopwatch.Elapsed; |
|
|
|
_output.WriteLine("代码运行时间:" + elapsed.TotalMilliseconds + "毫秒" + list.Count().ToString()); |
|
|
|
//foreach (var item in list)
|
|
|
|
//{
|
|
|
|
// _output.WriteLine(item.DisplayName);
|
|
|
|
//}
|
|
|
|
await unitOfWork.CompleteAsync(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |