OSDN Git Service

Merge remote-tracking branch 'upstream/master' into jp
[winmerge-jp/winmerge-jp.git] / Testing / PerfTest.cmd
1 if "%1" == "" (
2   set exepath=c:\progra~1\winmerge\winmergeu.exe
3 ) else (
4   set exepath=%1
5 )
6 if not exist %~dp0result.csv (
7   echo Date,Version,MainFrame,MergeEditFrame,DirFrame,Report > "%~dp0result.csv"
8 )
9 for /F "usebackq" %%f in (`powershell -command [System.Diagnostics.FileVersionInfo]::GetVersionInfo^('%exepath%'^).FileVersion`) do set Version=%%f
10 for /F "usebackq" %%f in (`powershell -command $^(measure-command { cmd '/c for /L %%i in ^(1,1,10^) do "%exepath%" /noninteractive /noprefs' }^).TotalSeconds`) do set MainFrame=%%f
11 for /F "usebackq" %%f in (`powershell -command $^(measure-command { cmd '/c for /L %%i in ^(1,1,10^) do "%exepath%" /noninteractive /noprefs c:\progra~1\winmerge\docs\readme.txt c:\progra~1\winmerge\docs\readme.txt' }^).TotalSeconds`) do set MergeEditFrame=%%f
12 for /F "usebackq" %%f in (`powershell -command $^(measure-command { cmd '/c for /L %%i in ^(1,1,10^) do "%exepath%" /noninteractive /noprefs c:\progra~1\winmerge\docs\ c:\progra~1\winmerge\docs\' }^).TotalSeconds`) do set DirFrame=%%f
13 if "%Version:2.16=%" == "%Version%" goto :SKIP_REPORT
14 for /F "usebackq" %%f in (`powershell -command $^(measure-command { cmd '/c %~dp0\ReportTest.cmd' }^).TotalSeconds`) do set Report=%%f
15 :SKIP_REPORT
16 echo %date% %time%,%Version%,%MainFrame%,%MergeEditFrame%,%DirFrame%,%Report% >> "%~dp0result.csv"