-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathspeed_CR.cmd
More file actions
65 lines (51 loc) · 1.24 KB
/
speed_CR.cmd
File metadata and controls
65 lines (51 loc) · 1.24 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
@echo off
setlocal EnableDelayedExpansion
set /a cycles=%~1+0
if "!cycles!" == "0" set cycles=10
call libTime
call :testSuite
exit /b
:testSuite
FOR /F %%# in ('findstr /R "^:speedtest_*" "%~f0"') do (
set "testname=%%# "
<nul set /p ".=Speedtest !cycles! for !testname:~0,30! ... "
set "startTime=!time!"
call %%#
set "stopTime=!time!"
%$diffTime% startTime stopTime diffTime_ms
set /a cycleTime=diffTime_ms / cycles
set "strDiffTime= !diffTime_ms!ms"
echo !strDiffTime:~-7! .. per cycle !cycleTime!ms
)
exit /b
:speedtest_CreateCR_copy_temp_file
FOR /L %%# in (1 1 %cycles%) DO (
for /f "usebackq delims= " %%C in (`copy /z "%~f0" nul`) do set "CR=%%C"
)
exit /b
:speedtest_CreateCR_copy
FOR /L %%# in (1 1 %cycles%) DO (
for /f "delims= " %%C in ('^"copy /z "%~f0" nul^"') do set "CR=%%C"
)
exit /b
:speedtest_CreateCR_replace
FOR /L %%# in (1 1 %cycles%) DO (
for /f "skip=1" %%C in ('"echo(| replace ? . /w /u"') do set "$CR=%%C"
)
exit /b
:speedtest_CreateCR_BufferLimit
(set LF=^
)
echo(
rem FOR /L %%# in (1 1 %cycles%) DO (
setlocal EnableDelayedExpansion
set x=leer
set "long=."
FOR /L %%n in (1 1 13) DO set "long=!long:~-4000!!long:~-4000!"
set^ x=!long!!long:~-189!1
echo !x!
echo #
echo(
endlocal
)
exit /b