Re: [spice 2/2] server: Weakly try to get a better latency value for the bandwidth test.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/15/2015 05:38 PM, Francois Gouget wrote:
Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
---

NET_TEST_WARMUP_BYTES is 0 so the warmup ping is the same as the one we
use to measure the latency. Even if it was not, the actual latency would
be the MIN() of both anyway so we might as well use both roundtrip times
to ward off latency jitter a bit.

Hi Francois,

Looks good to me, but please add the comment to the log message
(above the scissors).

Thanks,
    Uri.



  server/main_channel.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/main_channel.c b/server/main_channel.c
index f1b38af..0df1751 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -959,11 +959,12 @@ static int main_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint
              case NET_TEST_STAGE_WARMUP:
                  mcc->net_test_id++;
                  mcc->net_test_stage = NET_TEST_STAGE_LATENCY;
+                mcc->latency = roundtrip;
                  break;
              case NET_TEST_STAGE_LATENCY:
                  mcc->net_test_id++;
                  mcc->net_test_stage = NET_TEST_STAGE_RATE;
-                mcc->latency = roundtrip;
+                mcc->latency = MIN(mcc->latency, roundtrip);
                  break;
              case NET_TEST_STAGE_RATE:
                  mcc->net_test_id = 0;


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]