From nobody Sat Nov 13 23:02:26 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CAF9818508ED; Sat, 13 Nov 2021 23:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hs9vk5Rb6z50VC; Sat, 13 Nov 2021 23:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A9311BD98; Sat, 13 Nov 2021 23:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ADN2Q69089933; Sat, 13 Nov 2021 23:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ADN2Qq1089932; Sat, 13 Nov 2021 23:02:26 GMT (envelope-from git) Date: Sat, 13 Nov 2021 23:02:26 GMT Message-Id: <202111132302.1ADN2Qq1089932@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 5d9d86f85fd3 - main - sysutils/zpool-iostat-viz: reduce delay of interactive commands List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d9d86f85fd3cca6dce6769139ca52e75e3a6f39 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=5d9d86f85fd3cca6dce6769139ca52e75e3a6f39 commit 5d9d86f85fd3cca6dce6769139ca52e75e3a6f39 Author: Stefan Eßer AuthorDate: 2021-11-13 23:01:42 +0000 Commit: Stefan Eßer CommitDate: 2021-11-13 23:01:42 +0000 sysutils/zpool-iostat-viz: reduce delay of interactive commands --- sysutils/zpool-iostat-viz/Makefile | 1 + .../zpool-iostat-viz/files/patch-zpool-iostat-viz | 25 +++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/sysutils/zpool-iostat-viz/Makefile b/sysutils/zpool-iostat-viz/Makefile index f8c4a71ab7b8..ec63f247aa55 100644 --- a/sysutils/zpool-iostat-viz/Makefile +++ b/sysutils/zpool-iostat-viz/Makefile @@ -1,5 +1,6 @@ PORTNAME= zpool-iostat-viz DISTVERSION= 3 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= se@FreeBSD.org diff --git a/sysutils/zpool-iostat-viz/files/patch-zpool-iostat-viz b/sysutils/zpool-iostat-viz/files/patch-zpool-iostat-viz index 6f8ea84cea21..6b025cdf7bf9 100644 --- a/sysutils/zpool-iostat-viz/files/patch-zpool-iostat-viz +++ b/sysutils/zpool-iostat-viz/files/patch-zpool-iostat-viz @@ -1,4 +1,4 @@ ---- zpool-iostat-viz.orig 2021-11-06 15:43:57 UTC +--- zpool-iostat-viz.orig 2021-11-13 22:58:47 UTC +++ zpool-iostat-viz @@ -19,7 +19,10 @@ import sys EMPTY_COLORS = (238, 8) @@ -12,14 +12,16 @@ DIFFL_CLOCK_CHARS = "╷╴╵╶" DIFFL_STAT_MEMORY = 5 -@@ -219,6 +222,15 @@ def render_stats(window, transform, should_show_differ +@@ -219,10 +222,22 @@ def render_stats(window, transform, should_show_differ elif in_key == curses.KEY_DOWN: if diffl_stat_interval_index > 0: diffl_stat_interval_index -= 1 + elif in_key == ord('d'): + should_show_differential = not should_show_differential + elif in_key == ord('m'): ++ load_time = None + current = 0 ++ stats = None + stats_history = [] + if transform == stats_as_device_centric: + transform = stats_as_measurement_centric @@ -27,8 +29,15 @@ + transform = stats_as_device_centric elif in_key == ord('q') or in_key == ord('x') or in_key == 27: return - current += len(stats) -@@ -256,6 +266,8 @@ if __name__ == "__main__": +- current += len(stats) +- current %= len(stats) ++ if stats: ++ current += len(stats) ++ current %= len(stats) + + + def main(window, should_show_differential, pool, filename, views): +@@ -256,6 +271,8 @@ if __name__ == "__main__": arg_parser.add_argument("--pal-count", "--pc", action="store", metavar="P", default="0", help="palette for bucket populations") arg_parser.add_argument("parts", metavar="pool/vdev", nargs="*", help="Pools or vdevs to display") arg_parser.add_argument("--help-colors", action="store_true", help="see color palettes available") @@ -37,15 +46,15 @@ parsed_args = vars(arg_parser.parse_args()) -@@ -276,6 +288,11 @@ if __name__ == "__main__": +@@ -275,6 +292,11 @@ if __name__ == "__main__": + if hex(pi)[2:] == parsed_args["pal_time"]: print(" (time)", end="") print() sys.exit(0) - ++ + if parsed_args["digits"]: + DISPLAY_CHARS = DISPLAY_CHARS_DIGITS + if parsed_args["symbols"]: + DISPLAY_CHARS = DISPLAY_CHARS_SYMBOLS -+ + curses.wrapper(lambda window: main(window, parsed_args["diff"], parsed_args["parts"], parsed_args["file"], parsed_args["by"] or "m")) except subprocess.CalledProcessError as exc: - print("I couldn't get your pool information. Make sure you have 'zpool' program and specify your pool correctly.")