diff options
author | 2015-07-16 18:50:09 +0000 | |
---|---|---|
committer | 2015-07-16 18:50:09 +0000 | |
commit | 0a194ca54f5b50c9d2eb3646ddd65d69ea86451b (patch) | |
tree | 5a7759863cfeba19c72e84a21d2f9552c65ba229 | |
parent | Introduce a Linux compatible wait_event API and use it in the inteldrm code. (diff) | |
download | wireguard-openbsd-0a194ca54f5b50c9d2eb3646ddd65d69ea86451b.tar.xz wireguard-openbsd-0a194ca54f5b50c9d2eb3646ddd65d69ea86451b.zip |
Print the received percentage in client.log instead of dots.
This makes it nicer when waiting for large test files.
-rw-r--r-- | regress/usr.sbin/httpd/tests/funcs.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/regress/usr.sbin/httpd/tests/funcs.pl b/regress/usr.sbin/httpd/tests/funcs.pl index f6503e72a11..2738d419179 100644 --- a/regress/usr.sbin/httpd/tests/funcs.pl +++ b/regress/usr.sbin/httpd/tests/funcs.pl @@ -1,4 +1,4 @@ -# $OpenBSD: funcs.pl,v 1.3 2015/07/16 18:18:07 reyk Exp $ +# $OpenBSD: funcs.pl,v 1.4 2015/07/16 18:50:09 reyk Exp $ # Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org> # @@ -222,7 +222,8 @@ sub http_response { if ($chunked) { read_chunked($self); } else { - read_char($self, $vers eq "1.1" ? $len : undef) + #$len = $vers eq "1.1" ? $len : undef; + read_char($self, $len) if $method eq "GET"; } } @@ -289,10 +290,12 @@ sub read_char { print STDERR "Max\n"; } else { while ((my $r = sysread(STDIN, my $buf, POSIX::BUFSIZ))) { + my $pct; $_ = $buf; $len += $r; $ctx->add($_); - print STDERR "."; + $pct = ($len / $max) * 100.0; + printf(STDERR "%.2f%%\n", $pct); if (defined($max) && $len >= $max) { print STDERR "\nMax"; last; |