Skip to content

Instantly share code, notes, and snippets.

@bagusnl
Created September 4, 2022 15:50
Show Gist options
  • Save bagusnl/e9af7861e56fbadabc62bdab68ef6f56 to your computer and use it in GitHub Desktop.
Save bagusnl/e9af7861e56fbadabc62bdab68ef6f56 to your computer and use it in GitHub Desktop.
CPU CCX/Cache/Memory Benchmark Script
@echo off
:: CCX, Memory, and Cache benchmark automator by bagusnl
:: Requires CCXLatency.exe (can be found in Ryzen DRAM Calculator by 1usmus) and AIDA64 Engineer Edition
echo RUN THIS BATCH FILE AS ADMINISTRATOR TO PREVENT ERRORS/EXCESSIVE UAC REQUESTS
:: Set your AIDA64 Engineer and CCXLatency.exe path here
set aida=".\tools\AIDA64\aida64.exe"
set ccxlat=".\tools\CCXLatency.exe"
:aidacheck
echo Checking dependencies...
if exist %aida% (
echo AIDA is detected
GOTO ccxlatcheck
) else (
echo AIDA is missing, check dependencies path in the batch file!
goto exit
)
:ccxlatcheck
if exist %ccxlat% (
echo CCXLatency is detected
GOTO varcheck
) else (
echo CCXLatency is missing, check dependencies path in the batch file!
goto exit
)
echo.
:varcheck
cd /d %~dp0
echo Current working dir is: %cd%
::clearing variables
set resfolder=
set /p resfolder="Enter destination benchmark result folder name: "
if '%resfolder%' == '' (
echo Please enter the benchmark result folder in the variable
GOTO exit
)
echo Benchmark results will get saved in %resfolder%
pause
mkdir %resfolder%
:benchstart
::Starting CCXLatency bench prog
::DELETE THIS SECTION IF YOU ARE USING INTEL OR NON AMD ZEN-BASED CPUs
echo.
echo Running CCXLatency 10 times with 10 seconds sleep inbetween
echo Result will be saved in %resfolder%\ccxlatency.log
for /L %%i in (1,1,10) do (
echo Run #%%i
%ccxlat% >> %resfolder%\ccxlatency.log
timeout 10 > NUL
)
echo CCX Latency benchmark is done...
:: Starting AIDA64 Memory and Cache benchmark
:: Change xml to jpg to save the result as jpg instead or remove completely to save both format
echo Running AIDA64 Memory and Cache Benchmark 10 times with 10 seconds sleep inbetween
for /L %%a in (1,1,10) do (
echo Run #%%a
%aida% /CMBENCH %resfolder%\aidacm_%%a.xml
timeout 10 > NUL
)
echo Memory and Cache benchmark is done...
echo Benchmark finished
GOTO exit
:exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment