diff -Nru sluice-0.02.13/debian/changelog sluice-0.02.14/debian/changelog --- sluice-0.02.13/debian/changelog 2021-04-28 21:30:37.000000000 +0000 +++ sluice-0.02.14/debian/changelog 2021-11-15 22:23:24.000000000 +0000 @@ -1,3 +1,17 @@ +sluice (0.02.14-1) unstable; urgency=medium + + * Makefile: bump version + * sluice.c: update copyright + * Makefile: update copyright + * Makefile: add README.md to dist rule + * manual: update date, author email and copyright + * debian/watch: update watch path for tarball, move to version 4 + * debian/control: update author email address and project URL + * Add README.md + * snapcraft: update to core20 + + -- Colin Ian King Mon, 15 Nov 2021 22:23:24 +0000 + sluice (0.02.13-1) unstable; urgency=medium * Makefile: bump version diff -Nru sluice-0.02.13/debian/control sluice-0.02.14/debian/control --- sluice-0.02.13/debian/control 2021-04-28 21:30:37.000000000 +0000 +++ sluice-0.02.14/debian/control 2021-11-15 22:23:24.000000000 +0000 @@ -2,11 +2,11 @@ Rules-Requires-Root: no Section: utils Priority: optional -Maintainer: Colin King -Standards-Version: 4.1.2 +Maintainer: Colin Ian King +Standards-Version: 4.5.1 Build-Depends: debhelper (>= 13), debhelper-compat (=13) -Homepage: http://kernel.ubuntu.com/~cking/sluice +Homepage: https://github.com/ColinIanKing/sluice Package: sluice Architecture: any diff -Nru sluice-0.02.13/debian/copyright sluice-0.02.14/debian/copyright --- sluice-0.02.13/debian/copyright 2021-04-28 21:30:37.000000000 +0000 +++ sluice-0.02.14/debian/copyright 2021-11-15 22:23:24.000000000 +0000 @@ -1,10 +1,11 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: sluice -Upstream-Contact: Colin King -Source: git://kernel.ubuntu.com/cking/sluice.git +Upstream-Contact: Colin Ian King +Source: https://github.com/ColinIanKing/sluice Files: * Copyright: 2012-2021, Canonical Ltd + 2021, Colin Ian King License: GPL-3 On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-3'. diff -Nru sluice-0.02.13/debian/watch sluice-0.02.14/debian/watch --- sluice-0.02.13/debian/watch 2021-04-28 21:30:37.000000000 +0000 +++ sluice-0.02.14/debian/watch 2021-11-15 22:23:24.000000000 +0000 @@ -1,2 +1,5 @@ -version=3 -http://kernel.ubuntu.com/~cking/tarballs/sluice/sluice-(.+).tar.gz +version=4 +opts="filenamemangle=s%(?:.*?)?V?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \ + https://github.com/ColinIanKing/sluice/tags \ + (?:.*?/)?V?(\d[\d.]*)\.tar\.gz debian uupdate + diff -Nru sluice-0.02.13/Makefile sluice-0.02.14/Makefile --- sluice-0.02.13/Makefile 2021-04-28 21:31:09.000000000 +0000 +++ sluice-0.02.14/Makefile 2021-11-15 22:24:06.000000000 +0000 @@ -1,5 +1,6 @@ # # Copyright (C) 2014-2021 Canonical, Ltd. +# Copyright (C) 2021 Colin Ian King # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -15,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.02.13 +VERSION=0.02.14 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 @@ -43,7 +44,7 @@ rm -rf sluice-$(VERSION) mkdir sluice-$(VERSION) cp -rp Makefile sluice.c sluice.1 COPYING snap \ - .travis.yml bash-completion sluice-$(VERSION) + .travis.yml bash-completion README.md sluice-$(VERSION) tar -zcf sluice-$(VERSION).tar.gz sluice-$(VERSION) rm -rf sluice-$(VERSION) diff -Nru sluice-0.02.13/README.md sluice-0.02.14/README.md --- sluice-0.02.13/README.md 1970-01-01 00:00:00.000000000 +0000 +++ sluice-0.02.14/README.md 2021-11-15 22:24:06.000000000 +0000 @@ -0,0 +1,72 @@ +# Sluice + +Sluice is a program that reads input on stdin and outputs on stdout at a specified data rate. + +# Sluice command line options + +* -a append to file (-t, -O options only). +* -c specify the constant delay time between each write. +* -d discard data, do not copy it to stdout. This makes sluice act as a data sink. +* -e skip read errors. +* -f specify the frequency of -v verbose statistics updates. +* -h print help. +* -i specify the read/write size. +* -m specify amount of data to process. +* -n no rate controls, just copy data untouched. +* -o detect overflow and re-size read/write buffer size to stop overflows. +* -p enable verbose mode with progress and ETA statistics. +* -O short cut for -dt; output to a file. +* -r specify the data rate. +* -R ignore stdin, read random data from /dev/urandom. +* -s set delay shift, controls delay adjustment. +* -S display statistics at end of stream to stderr. +* -t tee output to the specified file. +* -T stop after a specified amount of time. +* -u detect underflow and re-size read/write buffer. +* -v write verbose statistics to stderr. +* -V print version information. +* -w warn if a long burst of continuous data rate underflow occur. +* -z ignore stdin, generate zeros. + +Note that suffixes of B, K, M and G specify sizes and rates in bytes, Kbytes, Mbytes and Gbytes respectively. + +# Sluice signal handling + +killing sluice with the following signals will toggle the following modes: + +* SIGUSR1 toggle -v verbose mode +* SIGUSR2 toggle -o -u overrun/underrun modes + +# Example + +``` +cat /dev/zero | sluice -r 64K -v -m 32M > /dev/null + +sluice -R -r 2M -T 1m -S -i 4K > myfifo +Data: 119.99 MB +Reads: 30718 +Writes: 30718 +Avg. Write Size: 4.00 KB +Duration: 60.000 secs +Target rate: 2.00 MB/sec +Average rate: 2.00 MB/sec +Minimum rate: 1.42 MB/sec +Maximum rate: 2.19 MB/sec +Drift from target rate: (%) + 0.00% - 0.99%: 99.43% + 1.00% - 1.99%: 0.31% + 2.00% - 3.99%: 0.16% + 4.00% - 7.99%: 0.07% + 8.00% - 15.99%: 0.02% + 16.00% - 31.99%: 0.02% + 32.00% - 63.99%: 0.00% + >64.00% : 0.00% +Overruns: 47.41% +Underruns: 52.46% +User time: 0.180 secs +System time: 19.100 secs +``` + +# Why so many tweakables? + +Sluice provides different ways to adjust the data rate for specific use-cases. The -i option allows one to specify the read/write size and hence the only the delay between writes can be used to control the data rate. Using the -o and -u options allows further adjustment of the write size to help reach the desired rate faster. The -s option allows sluice to add more control to the data rate adjustments. The delay time or buffer sizes are modified by the previous values right shifted by the -s shift value. The larger the shift value the smaller the modification, and hence the longer it will take to reach the desired data rate. The smaller the shift value the quicker it will take sluice to reach the desired data rate, however, it can cause large overruns or underrun oscillations which are not desirable. diff -Nru sluice-0.02.13/sluice.1 sluice-0.02.14/sluice.1 --- sluice-0.02.13/sluice.1 2021-04-28 21:31:09.000000000 +0000 +++ sluice-0.02.14/sluice.1 2021-11-15 22:24:06.000000000 +0000 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH SLUICE 1 "March 6, 2016" +.TH SLUICE 1 "15 November 2021 .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -228,12 +228,12 @@ .BR pv(1), .BR cstream(1) .SH AUTHOR -sluice was written by Colin King with testing feedback and help from Kamal Mostafa. +sluice was written by Colin Ian King with testing feedback and help from Kamal Mostafa. .PP -This manual page was written by Colin King , +This manual page was written by Colin Ian King for the Ubuntu project (but may be used by others). .SH COPYRIGHT -Copyright \(co 2014-2021 Canonical Ltd. +Copyright \(co 2014-2021 Canonical Ltd, Copyright \(co 2021 Colin Ian King .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -Nru sluice-0.02.13/sluice.c sluice-0.02.14/sluice.c --- sluice-0.02.13/sluice.c 2021-04-28 21:31:09.000000000 +0000 +++ sluice-0.02.14/sluice.c 2021-11-15 22:24:06.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2014-2021 Canonical + * Copyright (C) 2021 Colin Ian King * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -15,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Author Colin Ian King, colin.king@canonical.com + * Author Colin Ian King, colin.i.king@gmail.com */ #define _GNU_SOURCE diff -Nru sluice-0.02.13/snap/snapcraft.yaml sluice-0.02.14/snap/snapcraft.yaml --- sluice-0.02.13/snap/snapcraft.yaml 2021-04-28 21:31:09.000000000 +0000 +++ sluice-0.02.14/snap/snapcraft.yaml 2021-11-15 22:24:06.000000000 +0000 @@ -3,9 +3,18 @@ description: Sluice reads from standard input and write to standard output at a specified data rate. This can be useful for benchmarking and exercising I/O streaming at desired throughput rates. confinement: strict assumes: [snapd2.45] -base: core18 +base: core20 adopt-info: sluice grade: stable +adopt-info: sluice + +architectures: + - build-on: s390x + - build-on: ppc64el + - build-on: arm64 + - build-on: armhf + - build-on: amd64 + - build-on: i386 parts: sluice: