New option "--stats", to show a line of statistics about the transfer once it has ended (issue #49).

This commit is contained in:
Andrew Wood
2024-10-04 15:12:22 +01:00
parent fe4cc4b01d
commit 9bd5a518ea
19 changed files with 473 additions and 264 deletions
+1
View File
@@ -97,5 +97,6 @@ is acknowledged and greatly appreciated:
* [alexanderperlis](https://codeberg.org/alexanderperlis) - provided initial support for block devices with "`--size @FILE`" ([#94](https://codeberg.org/a-j-wood/pv/pulls/94))
* [jettero](https://codeberg.org/jettero) - reported double-free coredump when using "`--watchfd`" after 1.8.10 ([#96](https://codeberg.org/a-j-wood/pv/issues/96))
* Hartmut Goebel - provided a full set of new German translations ([#98](https://codeberg.org/a-j-wood/pv/pulls/98))
* Venky.N.Iyer - suggested "`--stats`" ([#49](https://codeberg.org/a-j-wood/pv/issues/49))
---
+1
View File
@@ -1,5 +1,6 @@
### UNRELEASED
* feature: new "`--stats`" option to show transfer stats at the end, like "`ping`" ([#49](https://codeberg.org/a-j-wood/pv/issues/49))
* i18n: complete set of German translations supplied by Hartmut Goebel ([#98](https://codeberg.org/a-j-wood/pv/pulls/98))
* fix: resume stopped pipelines when running in the background (part of [#56](https://codeberg.org/a-j-wood/pv/issues/56))
* fix: write UTC timestamps in debugging mode to avoid lockups in signal handlers
+7 -1
View File
@@ -1,4 +1,4 @@
.TH PV 1 "September 2024" Linux "User Manuals"
.TH PV 1 "October 2024" Linux "User Manuals"
.SH NAME
pv \- monitor the progress of data through a pipe
.SH SYNOPSIS
@@ -195,6 +195,12 @@ to determine the output format. See the
.B FORMATTING
section below.
.TP
.B \-v, \-\-stats
At the end of the transfer, write an additional line showing the transfer
rate minimum, maximum, mean, and standard deviation. The values are always
in bytes per second (or bits, with
.BR \-8 ).
.TP
.B \-n, \-\-numeric
Numeric output. Instead of giving a visual indication of progress,
.B pv
+9 -3
View File
@@ -34,9 +34,9 @@ the expected size to **pv**:
A more complicated example using numeric output to feed into the
**dialog**(1) program for a full-screen progress display:
> **(tar cf - . \\** \
> **\| pv -n -s \$(du -sb . \| awk \'{print \$1}\') \\** \
> **\| gzip -9 \> out.tgz) 2\>&1 \\** \
> **(tar cf - . \\**\
> ** \| pv -n -s \$(du -sb . \| awk \'{print \$1}\') \\**\
> ** \| gzip -9 \> out.tgz) 2\>&1 \\**\
> **\| dialog \--gauge \'Progress\' 7 70**
Taking an image of a disk, skipping errors:
@@ -144,6 +144,12 @@ that are explicitly switched on will be shown.
**-T**, and **-A**, and instead use the format string *FORMAT* to
determine the output format. See the **FORMATTING** section below.
**-v, \--stats**
: At the end of the transfer, write an additional line showing the
transfer rate minimum, maximum, mean, and standard deviation. The
values are always in bytes per second (or bits, with **-8**).
**-n, \--numeric**
: Numeric output. Instead of giving a visual indication of progress,