This commit is contained in:
2025-09-09 16:19:16 +00:00
commit 2053d4dfb3
2 changed files with 186 additions and 0 deletions

36
run_stress_test.bat Normal file
View File

@@ -0,0 +1,36 @@
@echo off
echo Checking for Python installation...
:: Kiểm tra xem Python có được cài đặt không
py --version >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Error: Python is not installed or not added to PATH.
echo Please install Python from https://www.python.org/ and ensure it's added to PATH.
pause
exit /b 1
)
:: Kiểm tra xem file stress_test.py có tồn tại không
if not exist "stress_test.py" (
echo Error: stress_test.py not found in the current directory.
pause
exit /b 1
)
:: Kiểm tra và cài đặt thư viện requests nếu chưa có
echo Checking for requests library...
py -c "import requests" >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Installing requests library...
pip install requests
if %ERRORLEVEL% neq 0 (
echo Error: Failed to install requests library.
pause
exit /b 1
)
)
:: Chạy file stress_test.py
echo Running stress_test.py...
py stress_test.py
pause