mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tools: run-perf-tests
This commit is contained in:
parent
e86dcde1a1
commit
535babc0d5
54
tools/run-perf-tests.bat
Executable file
54
tools/run-perf-tests.bat
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
|
set Configuration=Release
|
||||||
|
if not X%1==X set Configuration=%1
|
||||||
|
|
||||||
|
pushd %~dp0..
|
||||||
|
set ProjRoot=%cd%
|
||||||
|
if not exist "%ProjRoot%\build\VStudio\build\%Configuration%" echo === No tests found >&2 & goto fail
|
||||||
|
popd
|
||||||
|
|
||||||
|
verifier /query | findstr winfsp >nul 2>nul
|
||||||
|
if !ERRORLEVEL! equ 0 echo warning: verifier for winfsp is ON >&2
|
||||||
|
|
||||||
|
set fsbench="%ProjRoot%\build\VStudio\build\%Configuration%\fsbench-x64.exe"
|
||||||
|
mkdir fsbench
|
||||||
|
pushd fsbench
|
||||||
|
|
||||||
|
for %%a in (1000 2000 3000 4000 5000 6000 7000 8000 9000 10000) do (
|
||||||
|
call :csv %%a "%fsbench% --files=%%a file_*"
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%a in (100 200 300 400 500 600 700 800 900 1000) do (
|
||||||
|
call :csv %%a "%fsbench% --rdwr-cc=%%a rdwr_cc_*"
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%a in (10 20 30 40 50 60 70 80 90 100) do (
|
||||||
|
call :csv %%a "%fsbench% --rdwr-nc=%%a rdwr_nc_*"
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%a in (100 200 300 400 500 600 700 800 900 1000) do (
|
||||||
|
call :csv %%a "%fsbench% --mmap=%%a mmap_*"
|
||||||
|
)
|
||||||
|
|
||||||
|
popd
|
||||||
|
rmdir fsbench
|
||||||
|
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
:csv
|
||||||
|
set Iter=%1
|
||||||
|
for /F "tokens=1,2,3" %%i in ('%2') do (
|
||||||
|
if %%j==OK (
|
||||||
|
set Name=%%i
|
||||||
|
set Name=!Name:.=!
|
||||||
|
set Time=%%k
|
||||||
|
set Time=!Time:s=!
|
||||||
|
|
||||||
|
echo !Name!,!Iter!,!Time!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
exit /b 0
|
@ -302,9 +302,9 @@ int main(int argc, char *argv[])
|
|||||||
OptRdwrCcCount = strtoul(a + sizeof "--rdwr-cc=" - 1, 0, 10);
|
OptRdwrCcCount = strtoul(a + sizeof "--rdwr-cc=" - 1, 0, 10);
|
||||||
rmarg(argv, argc, argi);
|
rmarg(argv, argc, argi);
|
||||||
}
|
}
|
||||||
else if (0 == strncmp("--rdwr-nocc=", a, sizeof "--rdwr-nocc=" - 1))
|
else if (0 == strncmp("--rdwr-nc=", a, sizeof "--rdwr-nc=" - 1))
|
||||||
{
|
{
|
||||||
OptRdwrNcCount = strtoul(a + sizeof "--rdwr-nocc=" - 1, 0, 10);
|
OptRdwrNcCount = strtoul(a + sizeof "--rdwr-nc=" - 1, 0, 10);
|
||||||
rmarg(argv, argc, argi);
|
rmarg(argv, argc, argi);
|
||||||
}
|
}
|
||||||
else if (0 == strncmp("--mmap=", a, sizeof "--mmap=" - 1))
|
else if (0 == strncmp("--mmap=", a, sizeof "--mmap=" - 1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user