Make streaming refill probe latency-independent
This commit is contained in:
parent
e8ee006b20
commit
30ae88f8a3
1 changed files with 8 additions and 2 deletions
|
|
@ -199,8 +199,11 @@ verifyThrottle context session directory = do
|
|||
verifyRefill :: ProbeContext -> Session -> FilePath -> IO ()
|
||||
verifyRefill context session directory = do
|
||||
let bodyPath = directory <> "/refill-upload.bin"
|
||||
refillPath = directory <> "/refill-byte.bin"
|
||||
writeZeros bodyPath 65536
|
||||
BS.writeFile refillPath "x"
|
||||
digest <- hashFile bodyPath
|
||||
refillDigest <- hashFile refillPath
|
||||
initial <- curlUploadFileDeclared
|
||||
context session "refill-initial.bin"
|
||||
"72000000-0000-4000-8000-000000000001"
|
||||
|
|
@ -215,7 +218,7 @@ verifyRefill context session directory = do
|
|||
refilled <- curlUploadFileDeclared
|
||||
context session "refill-refilled.bin"
|
||||
"72000000-0000-4000-8000-000000000002"
|
||||
65536 digest bodyPath
|
||||
1 refillDigest refillPath
|
||||
requireSucceeded "refilled token bucket" refilled
|
||||
putStrLn "Token-bucket refill behavior passed"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue