76 lines
2.6 KiB
Batchfile
76 lines
2.6 KiB
Batchfile
@echo off
|
|
title RFCP Coverage API Test
|
|
echo ============================================
|
|
echo RFCP Coverage API Test
|
|
echo ============================================
|
|
echo.
|
|
|
|
set API=http://127.0.0.1:8888
|
|
|
|
:: Test 1: Health check
|
|
echo [TEST 1] Health check...
|
|
curl -s -o nul -w "HTTP %%{http_code}" %API%/api/health
|
|
echo.
|
|
echo.
|
|
|
|
:: Test 2: Health details
|
|
echo [TEST 2] Health details:
|
|
curl -s %API%/api/health
|
|
echo.
|
|
echo.
|
|
|
|
:: Test 2b: System info (CPU cores, parallel mode)
|
|
echo [TEST 2b] System info:
|
|
curl -s %API%/api/system/info
|
|
echo.
|
|
echo.
|
|
|
|
:: Test 3: Coverage - Fast preset, 1 site, 2km radius, 500m resolution (small/quick)
|
|
echo [TEST 3] Coverage calculation (Fast preset, 2km radius, 500m res)...
|
|
echo This should complete in a few seconds.
|
|
echo.
|
|
|
|
curl -s -w "\n\nHTTP %%{http_code} - Total time: %%{time_total}s\n" ^
|
|
-X POST %API%/api/coverage/calculate ^
|
|
-H "Content-Type: application/json" ^
|
|
-d "{\"sites\": [{\"lat\": 50.45, \"lon\": 30.52, \"height\": 30, \"power\": 43, \"gain\": 15, \"frequency\": 1800}], \"settings\": {\"radius\": 2000, \"resolution\": 500, \"preset\": \"fast\"}}" ^
|
|
-o coverage-result-fast.json
|
|
|
|
echo Result saved to coverage-result-fast.json
|
|
echo.
|
|
|
|
:: Test 4: Coverage - Standard preset, 5km radius
|
|
echo [TEST 4] Coverage calculation (Standard preset, 5km radius, 300m res)...
|
|
echo This tests building/material lookups.
|
|
echo.
|
|
|
|
curl -s -w "\n\nHTTP %%{http_code} - Total time: %%{time_total}s\n" ^
|
|
-X POST %API%/api/coverage/calculate ^
|
|
-H "Content-Type: application/json" ^
|
|
-d "{\"sites\": [{\"lat\": 50.45, \"lon\": 30.52, \"height\": 30, \"power\": 43, \"gain\": 15, \"frequency\": 1800}], \"settings\": {\"radius\": 5000, \"resolution\": 300, \"preset\": \"standard\"}}" ^
|
|
-o coverage-result-standard.json
|
|
|
|
echo Result saved to coverage-result-standard.json
|
|
echo.
|
|
|
|
:: Test 5: Coverage - Detailed preset, 5km radius
|
|
echo [TEST 5] Coverage calculation (Detailed preset, 5km radius, 300m res)...
|
|
echo This tests dominant path + vegetation.
|
|
echo.
|
|
|
|
curl -s -w "\n\nHTTP %%{http_code} - Total time: %%{time_total}s\n" ^
|
|
-X POST %API%/api/coverage/calculate ^
|
|
-H "Content-Type: application/json" ^
|
|
-d "{\"sites\": [{\"lat\": 50.45, \"lon\": 30.52, \"height\": 30, \"power\": 43, \"gain\": 15, \"frequency\": 1800}], \"settings\": {\"radius\": 5000, \"resolution\": 300, \"preset\": \"detailed\"}}" ^
|
|
-o coverage-result-detailed.json
|
|
|
|
echo Result saved to coverage-result-detailed.json
|
|
echo.
|
|
|
|
echo ============================================
|
|
echo All tests complete!
|
|
echo Check the debug console for timing output.
|
|
echo Also check data/coverage-debug.log
|
|
echo ============================================
|
|
pause
|