mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 00:13:01 -05:00
tools: wpr-test.bat
This commit is contained in:
parent
9ecb6541cf
commit
f0931a0cf2
38
tools/wpr-test.bat
Normal file
38
tools/wpr-test.bat
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
|
if not X%1==X set File=%1
|
||||||
|
if X%File%==X (echo usage: wpr-test file.etl fsbench-args... >&2 & goto fail)
|
||||||
|
|
||||||
|
REM see https://stackoverflow.com/a/45969239/429091
|
||||||
|
set Args=%*
|
||||||
|
call set Args=%%args:*%1=%%
|
||||||
|
|
||||||
|
REM see https://stackoverflow.com/a/11995662
|
||||||
|
net session >nul 2>&1
|
||||||
|
if %ERRORLEVEL% neq 0 echo must be run as Administrator >&2 & goto fail
|
||||||
|
|
||||||
|
set outdir=%cd%
|
||||||
|
pushd %~dp0..
|
||||||
|
set ProjRoot=%cd%
|
||||||
|
popd
|
||||||
|
|
||||||
|
set fsbench="%ProjRoot%\build\VStudio\build\Release\fsbench-x64.exe"
|
||||||
|
if not exist %fsbench% echo cannot find fsbench >&2 & goto fail
|
||||||
|
|
||||||
|
wpr -start CPU -start FileIO
|
||||||
|
|
||||||
|
mkdir fsbench
|
||||||
|
pushd fsbench
|
||||||
|
%fsbench% %Args%
|
||||||
|
popd
|
||||||
|
rmdir fsbench
|
||||||
|
|
||||||
|
wpr -stop %File% %File% -skipPdbGen
|
||||||
|
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
:fail
|
||||||
|
exit /b 1
|
Loading…
x
Reference in New Issue
Block a user