<commit_before>@echo off
@call copy.bat

@set exe="guetzli.exe"

@set file=big
@set q=95

@rem set CURRENT_TIME=%time:~0,2%:%time:~3,2%:%time:~6,2%
@rem echo CUDA Time Start = %CURRENT_TIME% --------------

@rem %exe% --cuda --quality %q% %file%.jpg %file%.cuda.jpg

@rem set CURRENT_TIME=%time:~0,2%:%time:~3,2%:%time:~6,2%
@rem echo CUDA Time End   = %CURRENT_TIME% --------------

@rem set CURRENT_TIME=%time:~0,2%:%time:~3,2%:%time:~6,2%
@rem echo Opencl Time Start = %CURRENT_TIME% ------------

@rem %exe% --opencl %file%.jpg %file%.opencl.jpg

@rem set CURRENT_TIME=%time:~0,2%:%time:~3,2%:%time:~6,2%
@rem echo Opencl Time End   = %CURRENT_TIME% ------------

set CURRENT_TIME=%time:~0,2%:%time:~3,2%:%time:~6,2%
echo C Time Start = %CURRENT_TIME% ------------

%exe% --quality %q% %file%.jpg %file%.cout.jpg

set CURRENT_TIME=%time:~0,2%:%time:~3,2%:%time:~6,2%
echo C Time End   = %CURRENT_TIME% ------------<commit_msg>单文件测试脚本<commit_after>@echo off
@call copy.bat

@set exe="guetzli.exe"
@set ns=0

@set file=%1
@set q=95

if "%file%"=="" (
	set file=timg
)

call :time2sec %time%
set time1=%ns%
%exe% --cuda --quality %q% %file%.jpg %file%.%q%.cuda.jpg
call :time2sec %time%
set time2=%ns%
set /a  diff=%time2%  - %time1%
calc_ssim_psnr -i %file%.jpg -o %file%.%q%.cuda.jpg
echo cuda quality %q% time = %diff%

call :time2sec %time%
set time1=%ns%
%exe% --opencl --quality %q% %file%.jpg %file%.%q%.opencl.jpg
call :time2sec %time%
set time2=%ns%
set /a  diff=%time2%  - %time1%
calc_ssim_psnr -i %file%.jpg -o %file%.%q%.opencl.jpg
echo opencl quality %q% time = %diff%

call :time2sec %time%
set time1=%ns%
%exe% --quality %q% %file%.jpg %file%.%q%.cout.jpg
call :time2sec %time%
set time2=%ns%
set /a  diff=%time2%  - %time1%
calc_ssim_psnr -i %file%.jpg -o %file%.%q%.cout.jpg
echo c quality %q% time = %diff%

goto :eof
 
:time2sec
rem ʱת浽ns
set tt=%1
set hh=%tt:~0,2%
set mm=%tt:~3,2%
set ss=%tt:~6,2%
set /a ns=(%hh%*60+%mm%)*60+%ss%
goto :eof
{'fraction_non_alphanumeric': 0.25063678043810494, 'fraction_numerical': 0.036678553234844626, 'mean_word_length': 3.9223057644110275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4376452', 'n_tokens_mistral': 908, 'n_tokens_neox': 888, 'n_words': 203}