Commit ac0e6050 authored by Junxing Zhang's avatar Junxing Zhang

Update three files for the goodput measurement using the whole packet size

parent 834bfb19
This diff is collapsed.
......@@ -86,6 +86,7 @@ typedef struct {
struct timeval captime;
unsigned long seq_start;
unsigned long seq_end;
unsigned int pkt_size;
} sniff_record;
typedef struct {
sniff_record records[SNIFF_WINSIZE];
......@@ -140,6 +141,7 @@ typedef struct
unsigned int firstUnknown;
unsigned int nextSequence;
unsigned int ackSize;
unsigned int fullAckSize; //full packet size
unsigned int repeatSize;
struct timeval beginTime;
struct timeval endTime;
......
......@@ -570,21 +570,21 @@ int send_delay_to_monitor(int monitor, int index)
unsigned long delay = 0;
unsigned long tmpulong;
// delay = delays[index];
// if (delay_count[index] > 0)
// {
// delay /= delay_count[index];
// }
// else
// {
// delay = last_delays[index];
// }
delay = base_rtt[index];
if (delay_count[index] == 0)
delay = delays[index];
if (delay_count[index] > 0)
{
delay = 0;
delay /= delay_count[index];
}
else
{
delay = last_delays[index];
}
// delay = base_rtt[index];
// if (delay_count[index] == 0)
//{
// delay = 0;
//}
// If measurement changed since last send
// if (abs((long)delays[index] - (long)last_delays[index])
......@@ -650,8 +650,8 @@ int send_bandwidth_to_monitor(int monitor, int index)
int buffer_size = 3*SIZEOF_LONG + 2*sizeof(unsigned short);
char outbuf[buffer_size];
unsigned long code = htonl(CODE_BANDWIDTH);
// unsigned long bandwidth = throughputTick(&throughput[index]);
unsigned long bandwidth = max_throughput[index];
unsigned long bandwidth = throughputTick(&throughput[index]);
//unsigned long bandwidth = max_throughput[index];
if (bandwidth != 0) {
// Insert the address info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment