"Transfer rate" patch
Vladimir Prus
ghost@cs.msu.su
Thu Sep 7 14:58:00 GMT 2006
Ilko Iliev wrote:
[snip quoted entire previous patch]
> --- ChangeLog.orig      2006-09-07 15:23:19.000000000 +0200
> +++ ChangeLog   2006-09-07 15:27:46.000000000 +0200
> @@ -1,3 +1,8 @@
> +2006-09-07 Â Ilko Iliev <iliev@ronetix.at>
> +
> +Â Â Â Â Â Â Â * symfile.c (print_transfer_performance): Fix overflow problem
> + Â Â Â Â and change bits/sec to KBytes/sec or bytes/sec
> +
> 2006-08-28  DJ Delorie  <dj@redhat.com>
>
> * m32c-tdep.c (m32c_decode_srcdest4): Initialize fields in sd
>
>
>
> --- symfile.c.orig      2006-08-31 15:29:12.000000000 +0200
> +++ symfile.c   2006-09-07 15:19:45.000000000 +0200
> @@ -1769,14 +1769,23 @@
> ui_out_text (uiout, "Transfer rate: ");
> if (time_count > 0)
> {
> - Â Â Â ui_out_field_fmt (uiout, "transfer-rate", "%lu",
> -Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1000 * (data_count * 8) / time_count);
> - Â Â Â ui_out_text (uiout, " bits/sec");
> + Â Â Â if ( data_count < 1024 )
> + Â Â Â Â {
> + Â Â Â Â Â ui_out_field_fmt (uiout, "transfer-rate", "%lu",
> + Â Â Â Â Â Â (unsigned long)((((unsigned long long)data_count) * 1000) /
> time_count));
I think the above line is longer than 80 characters, and that's probably not
OK.
Also, I think this branch should be taken if download speed is smaller that
1024 bytes *per second*, not when total download size is less than 1024
bytes.
- Volodya
More information about the Gdb-patches
mailing list