Make streaming refill probe latency-independent

This commit is contained in:
ms2k 2026-08-15 21:51:56 +09:00
commit 30ae88f8a3
2 changed files with 8 additions and 2 deletions

View file

@ -199,8 +199,11 @@ verifyThrottle context session directory = do
verifyRefill :: ProbeContext -> Session -> FilePath -> IO () verifyRefill :: ProbeContext -> Session -> FilePath -> IO ()
verifyRefill context session directory = do verifyRefill context session directory = do
let bodyPath = directory <> "/refill-upload.bin" let bodyPath = directory <> "/refill-upload.bin"
refillPath = directory <> "/refill-byte.bin"
writeZeros bodyPath 65536 writeZeros bodyPath 65536
BS.writeFile refillPath "x"
digest <- hashFile bodyPath digest <- hashFile bodyPath
refillDigest <- hashFile refillPath
initial <- curlUploadFileDeclared initial <- curlUploadFileDeclared
context session "refill-initial.bin" context session "refill-initial.bin"
"72000000-0000-4000-8000-000000000001" "72000000-0000-4000-8000-000000000001"
@ -215,7 +218,7 @@ verifyRefill context session directory = do
refilled <- curlUploadFileDeclared refilled <- curlUploadFileDeclared
context session "refill-refilled.bin" context session "refill-refilled.bin"
"72000000-0000-4000-8000-000000000002" "72000000-0000-4000-8000-000000000002"
65536 digest bodyPath 1 refillDigest refillPath
requireSucceeded "refilled token bucket" refilled requireSucceeded "refilled token bucket" refilled
putStrLn "Token-bucket refill behavior passed" putStrLn "Token-bucket refill behavior passed"

View file

@ -202,7 +202,10 @@ while IFS=$'\t' read -r lane coordination oidc target; do
deploy_application "$lane" "$profile" 1 262144 deploy_application "$lane" "$profile" 1 262144
run_streaming_job "$lane" "$profile" throttle run_streaming_job "$lane" "$profile" throttle
deploy_application "$lane" "$profile" 65536 65536 cleanup_application "$lane"
scale_coordination "$coordination" 0
scale_coordination "$coordination" 1
deploy_application "$lane" "$profile" 1 65536
run_streaming_job "$lane" "$profile" refill run_streaming_job "$lane" "$profile" refill
deploy_application "$lane" "$profile" 536870912 536870912 deploy_application "$lane" "$profile" 536870912 536870912