Realtime streaming / Bandwidth Throtteling

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

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.
You can see my code here: https://groups.google.com/forum/#!topic/gatling/Db9_yMJ8euk

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. :wink:

Br.
Kasper