Realtime streaming / Bandwidth Throtteling

24 views
Skip to first unread message

Moritz Kammerer

unread,
Mar 7, 2018, 5:30:00 AM3/7/18
to Gatling User Group
Hi,

I'm working on an server software which gets realtime-audio (currently PCM with 640 bytes / 20 ms) streamed via HTTP. I now want to use Gatling to load-test this software. Unfortunately i can't find any way to get Gatling to send my PCM file (90kb on disk) in realtime (that means the audio is 3 seconds long, so the http request also should take 3 seconds to stream).

Can you think of any method to get Gatling to throttle the bandwidth to 3200 Bytes / sec or any other way I would get that realtime streaming behaviour?

BR, Moritz

Kasper Johansen

unread,
Mar 13, 2018, 6:34:04 AM3/13/18
to Gatling User Group
Hi Moritz, 

I have tried to do a similar thing. But found that the pause, which I used to make it send audio every x in time, in my flow did not pause for exactly 1 sec. (1000ms) between the iterations. 

What I did was to take the file, and create a feeder:  `val fileBufferFeeder: Seq[Array[Byte]] = LoadFile.iteratorOfFileByteArrays.toSeq`. It is an sequence (list or ..)  of byte arrays (Seq[Array[Byte]] -> Scala).
Then I iterated over that feeder and added a pause on each iteration. 
 
But if you find a way to make it exactly run in real time then please share. ;-)

Br. 
Kasper
Reply all
Reply to author
Forward
0 new messages