-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.bat
More file actions
102 lines (79 loc) · 2.91 KB
/
Copy pathall.bat
File metadata and controls
102 lines (79 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
@echo off
cd /d %~dp0
rem ®«ë© ¯à®£®: ¡ ©âë ¢ë§®¢, ¨§ 祣® ®¨ ᪫ ¤ë¢ îâáï, ᢥàª
rem ®â¢¥â®¢, § ¬¥àë áà §ã ç¥âëàñå à â ©¬ å, § ¬¥àë Stopwatch
rem ¢ âàñå ०¨¬ å ¨ áï⨥ «¨á⨣®¢.
dotnet --list-runtimes | findstr /c:"Microsoft.NETCore.App 8." >nul || goto nortm
dotnet --list-runtimes | findstr /c:"Microsoft.NETCore.App 9." >nul || goto nortm
dotnet --list-runtimes | findstr /c:"Microsoft.NETCore.App 10." >nul || goto nortm
dotnet --list-runtimes | findstr /c:"Microsoft.NETCore.App 11." >nul || goto no11
rem Žâçñâë ¯à®è«®£® ¯à®£® ¥ 㤠«ïîâáï á ¬¨, ¨ ¤¢ ¯à®£® ᬥ訢 îâáï.
if exist BenchmarkDotNet.Artifacts rd /s /q BenchmarkDotNet.Artifacts
if exist Bdn rd /s /q Bdn
dotnet build -c Release
if errorlevel 1 goto fail
for %%F in (net8.0 net9.0 net10.0 net11.0) do call :reports %%F
if errorlevel 1 goto fail
rem ޤ¨ ¯à®£® ç¥âëॠà â ©¬ . ‡ ¯ã᪠¨¤ñâ ¯®¤ net10.0: ¯®¤ net11.0
rem BenchmarkDotNet 0.15.8 ¯ ¤ ¥â ¯à®¢¥àª¥, ¯®â®¬ã çâ® â ª®£® à â ©¬
rem ¥ § ¥â. –¥«¨ § ¤ ë áâப ¬¨ ¢ BenchmarkConfig.
dotnet run -c Release -f net10.0 --no-build -- --filter * --artifacts Bdn
if errorlevel 1 goto fail
for %%F in (net8.0 net9.0 net10.0 net11.0) do call :disasm %%F
echo.
echo Gotovo:
echo Bdn\results otchety BenchmarkDotNet: csv, md, html
echo allocations_netN.0.txt bajty na vyzov
echo sizes_netN.0.txt iz chego oni skladyvayutsya
echo checks_netN.0.txt sverka otvetov
echo timing_netN.0.txt zamer na Stopwatch
echo timing_netN.0_nopgo.txt to zhe bez dinamicheskogo profilya
echo timing_netN.0_servergc.txt to zhe na servernom sborshchike
echo disasm_netN.0.txt mashinnyj kod izmeryaemyh metodov
pause
exit /b 0
:reports
set FW=%1
set EXE=bin\Release\%FW%\SortComparerProof.exe
if not exist "%EXE%" exit /b 0
"%EXE%" allocations > allocations_%FW%.txt
"%EXE%" sizes > sizes_%FW%.txt
"%EXE%" checks > checks_%FW%.txt
if errorlevel 1 exit /b 1
"%EXE%" timing > timing_%FW%.txt
set DOTNET_TieredPGO=0
"%EXE%" timing > timing_%FW%_nopgo.txt
set DOTNET_TieredPGO=
set DOTNET_gcServer=1
"%EXE%" timing > timing_%FW%_servergc.txt
set DOTNET_gcServer=
echo Done reports %FW%
exit /b 0
:disasm
set FW=%1
set EXE=bin\Release\%FW%\SortComparerProof.exe
if not exist "%EXE%" exit /b 0
rem Ÿàãá ï ª®¬¯¨«ïæ¨ï ¢ëª«îç ¥âáï, ¨ ç¥ ¢ ä ©« ¯®¯ ¤ñâ ª®¤ ¯¥à¢®£® ïàãá .
rem Diffable § ¬¥ï¥â ¤à¥á § £«ã誮©, çâ®¡ë «¨á⨣¨ à §ëå ¯à®£®®¢
rem ᮢ¯ ¤ «¨ ¯®¡ ©â®¢®.
set DOTNET_TieredCompilation=0
set DOTNET_JitDisasmDiffable=1
set "DOTNET_JitDisasm=SortInts* SortItems* Search* CopyInts CopyItems"
"%EXE%" warmup > disasm_%FW%.txt 2>&1
set DOTNET_JitDisasm=
set DOTNET_JitDisasmDiffable=
set DOTNET_TieredCompilation=
echo Done disasm %FW%
exit /b 0
:nortm
echo Ne najden runtime 8, 9 ili 10.
pause
exit /b 1
:no11
echo Ne najden runtime 11. Zamery idut na chetyre celi, on obyazatelen.
pause
exit /b 1
:fail
echo Progon ostanovlen.
pause
exit /b 1