ndt-dev - [ndt-dev] [ndt] r743 committed - Changing throughput calculations to use 8.0 instead of 0
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r743 committed - Changing throughput calculations to use 8.0 instead of 0
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r743 committed - Changing throughput calculations to use 8.0 instead of 0
- Date: Sun, 30 Oct 2011 15:25:53 +0000
Revision: 743
Author:
Date: Sun Oct 30 08:25:11 2011
Log: Changing throughput calculations to use 8.0 instead of 0
http://code.google.com/p/ndt/source/detail?r=743
Modified:
/branches/kkumar_code_organize/src/test_c2s_clt.c
/branches/kkumar_code_organize/src/test_mid_clt.c
/branches/kkumar_code_organize/src/test_s2c_clt.c
/branches/kkumar_code_organize/src/utils.h
=======================================
--- /branches/kkumar_code_organize/src/test_c2s_clt.c Fri Oct 28 07:58:55 2011
+++ /branches/kkumar_code_organize/src/test_c2s_clt.c Sun Oct 30 08:25:11 2011
@@ -158,7 +158,7 @@
I2AddrFree(sec_addr);
// Calculate C2S throughput in kbps
- spdout = ((BITS_8 * pkts * lth) / KILO) / t;
+ spdout = ((BITS_8_FLOAT * pkts * lth) / KILO) / t;
//log_println(6," ---C->S CLT speed=%0.0f, pkts= %d, lth=%d, time=%d", spdout, pkts, lth, t);
=======================================
--- /branches/kkumar_code_organize/src/test_mid_clt.c Fri Oct 28 07:58:55 2011
+++ /branches/kkumar_code_organize/src/test_mid_clt.c Sun Oct 30 08:25:11 2011
@@ -149,7 +149,7 @@
t = secs() - t + 5.0;
// calculate throughput in Kbps
- spdin = ((BITS_8 * bytes) / KILO) / t;
+ spdin = ((BITS_8_FLOAT * bytes) / KILO) / t;
// Test is complete. Now, get results from server (includes CurrentMSS, WinScaleSent, WinScaleRcvd..).
// The results are sent from server in the form of a TEST_MSG
object
=======================================
--- /branches/kkumar_code_organize/src/test_s2c_clt.c Fri Oct 28 07:58:55 2011
+++ /branches/kkumar_code_organize/src/test_s2c_clt.c Sun Oct 30 08:25:11 2011
@@ -167,7 +167,9 @@
// get actual time for which data was received, and calculate throughput based on it.
t = secs() - t + 15.0;
- spdin = ((BITS_8 * bytes) / KILO) / t; //kbps
+ spdin = ((BITS_8_FLOAT * bytes) / KILO) / t; //kbps
+
+ //log_println(0,"S->C: Received %d bytes in %0.2f secs: Spdin= %f", bytes, t, spdin);
// Server sends calculated throughput value, unsent data amount in the socket queue
// and overall number of sent bytes in a TEST_MSG
@@ -203,7 +205,7 @@
return 4;
}
sbytes = atoi(ptr); // finally get total-sent-byte-count
-log_println(0,"S->C received throughput: %f",s2cspd);
+ //log_println(0,"S->C received throughput: %f",s2cspd);
// log results in a convenient units format
if (spdin < 1000)
printf("%0.2f kb/s\n", spdin);
=======================================
--- /branches/kkumar_code_organize/src/utils.h Fri Oct 28 19:23:28 2011
+++ /branches/kkumar_code_organize/src/utils.h Sun Oct 30 08:25:11 2011
@@ -30,6 +30,7 @@
#define MAX_TCP_PORT_STR "65535"
#define KILO_BITS 1024
#define BITS_8 8
+#define BITS_8_FLOAT 8.0
#define WINDOW_SCALE_THRESH 15
#define MEGA 1000000
#define KILO 1000
- [ndt-dev] [ndt] r743 committed - Changing throughput calculations to use 8.0 instead of 0, ndt, 10/30/2011
Archive powered by MHonArc 2.6.16.