Closed ali1hammoud closed 3 years ago
I believe you are talking about the mahimahi trace. The time stamp is the first entry of each line in the trace file. Say the numbers at a line are x, y
. It means the underlying mahimahi network emulator makes the network bandwidth y
, starting at time x
until the time at the next line.
You measure the time using standard timing libraries. For python, you can do something like datetime.datetime.now()
I meant the time stamp in /sim/multi_agent We have time stamp = delay + sleep_time? Why do we use it, and what is the meaning of it?
I want to measure the time for every chunk, for example, we have a set of chunks every one of them 2s, So to download it and play it, we need to calculate the 2s of playing, the delay and the sleep time? In another words, I want to measure the time of downloading and playing one video chunk.
The delay
is the time of downloading one video chunk. Check out https://github.com/hongzimao/pensieve/blob/master/sim/env.py#L103-L112 for sleep_time
. It simulates a behavior where the chunk download is paused when the buffer is large enough (e.g., 30 sec). This is mainly a copyright legal reason for most video players at streaming (so that your local computer won't download the entire video).
I don't think you need to simulate "the play time of one video chunk". The video just keeps playing until the buffer is empty. So upon downloading a chunk, we add to the buffer a chunk worth of video: https://github.com/hongzimao/pensieve/blob/master/sim/env.py#L100-L101. The playing of the video keeps going while you download the next chunk: https://github.com/hongzimao/pensieve/blob/master/sim/env.py#L94-L98
Take a look at the simulator for the buffer dynamics https://github.com/hongzimao/pensieve/blob/master/sim/env.py#L49. Thanks.
Thank you very much, that so helpful.
Please explain to what is the meaning of time stamp? And how can I measure the time to download one chunk?