aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/service_response_time_table.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-03 10:10:18 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-03 10:10:18 +0000
commitbb21d8c03cb8928d5d50b9b8533fe53cf756f9ba (patch)
treeba251eda87a4062d5090a3d4bb3bf3296ccbada5 /gtk/service_response_time_table.c
parente2ec56553eb128897c9de8cfe00e8268b1cb4ce1 (diff)
fix to various stats tables.
The code used to rely on min_time==0 to determine whether this was the first packet or not and whereby we had to initialize min_time to the current value. This obviously does not work for capture files with poor timestamp resolution where the response time is actually, according to the capture file, 0 and we got all sorts of weird effects like average response time being less than the minimum response time. note, the bug only affected the minimum response time in the tables and not max or average response time. it would "miss" tose minimum response times that were ==0 and display the minumin response time in the capture that were >0 svn path=/trunk/; revision=8358
Diffstat (limited to 'gtk/service_response_time_table.c')
-rw-r--r--gtk/service_response_time_table.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk/service_response_time_table.c b/gtk/service_response_time_table.c
index eb9400dc7d..d8cd4cf7fc 100644
--- a/gtk/service_response_time_table.c
+++ b/gtk/service_response_time_table.c
@@ -3,7 +3,7 @@
* Helper routines common to all service response time statistics
* tap.
*
- * $Id: service_response_time_table.c,v 1.5 2003/06/22 04:00:21 gerald Exp $
+ * $Id: service_response_time_table.c,v 1.6 2003/09/03 10:10:18 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -250,14 +250,12 @@ add_srt_table_data(srt_stat_table *rst, int index, nstime_t *req_time, packet_in
delta.secs--;
}
- if((rp->max.secs==0)
- && (rp->max.nsecs==0) ){
+ if(rp->num==0){
rp->max.secs=delta.secs;
rp->max.nsecs=delta.nsecs;
}
- if((rp->min.secs==0)
- && (rp->min.nsecs==0) ){
+ if(rp->num==0){
rp->min.secs=delta.secs;
rp->min.nsecs=delta.nsecs;
}
@@ -282,6 +280,7 @@ add_srt_table_data(srt_stat_table *rst, int index, nstime_t *req_time, packet_in
rp->tot.nsecs-=1000000000;
rp->tot.secs++;
}
+
rp->num++;
}