Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2006 09:56:17 -0600 (CST)
From:      doug@polands.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/91757: /usr/ports/sysutils/fastest_cvsup Suggested enhancement
Message-ID:  <200601131556.k0DFuGCC084739@ammon.polands.org>
Resent-Message-ID: <200601131600.k0DG0L5B093109@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91757
>Category:       ports
>Synopsis:       /usr/ports/sysutils/fastest_cvsup   Suggested enhancement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 13 16:00:21 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Doug Poland
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD ammon.polands.org 6.0-STABLE FreeBSD 6.0-STABLE #0: Fri Nov 11 19:47:54 CST 2005 djp@ammon.polands.org:/usr/obj/usr/src/sys/SMP i386


	
>Description:
	The display of the fastest 3 cvsup servers shows only ranking, and server name.
	It would be nice to know the speed of the server without having to scroll back
	up the page.  I've included a patch to do just that.
>How-To-Repeat:
	Display of the fastest 3 cvsup servers is the default.  My patch modifies the 
	default output.
>Fix:

	Patch was tested on i386, 5.2.1-RELEASE and 6.0-STABLE.

--- fastest_cvsup	2006/01/13 13:24:38	1.1
+++ fastest_cvsup	2006/01/13 13:43:08
@@ -526,9 +526,9 @@
 
     if ( $VERBOSE ) { # print pretty display
 
-      my $ms = sprintf("%.2f", 1000 * $time_taken); # time in ms
+      $time{$server} = 1000 * $time_taken ; # time in ms
       print $SERVER_RESULT, "server replied: $reply\n";
-      print $SERVER_RESULT, "time taken: $ms ms\n";
+      print $SERVER_RESULT, "time taken: " . sprintf("%.2f",$time{$server}) . " ms\n";
 
     }
   }
@@ -547,9 +547,9 @@
 
   if ( $VERBOSE ) {
     print "\n", $GENERAL_INFO, "Speed Daemons:\n" if $fastest[0]; # just checking ;)
-    print $SERVER_RESULT, "1st: $fastest[0]\n" if $fastest[0];
-    print $SERVER_RESULT, "2nd: $fastest[1]\n" if $fastest[1];
-    print $SERVER_RESULT, "3rd: $fastest[2]\n" if $fastest[2];
+    printf("%s1st: %-24s %.2f ms\n", $SERVER_RESULT, $fastest[0], $time{$fastest[0]}) if $fastest[0];
+    printf("%s2st: %-24s %.2f ms\n", $SERVER_RESULT, $fastest[1], $time{$fastest[1]}) if $fastest[1];
+    printf("%s3st: %-24s %.2f ms\n", $SERVER_RESULT, $fastest[2], $time{$fastest[2]}) if $fastest[2];
   }
   else {  # otherwise just output the fastest.
     print $fastest[0];


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601131556.k0DFuGCC084739>