Skip to content

Commit 03fd5e6

Browse files
committed
fix(amzn): Print initial absolute snapshot before polling diffs
The interval polling loop was sleeping before printing anything, so the user never saw the initial absolute stats. Print the first snapshot immediately, then use it as the baseline for subsequent diffs.
1 parent 9bcdb34 commit 03fd5e6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

plugins/amzn/amzn-nvme.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,12 @@ static int get_stats(int argc, char **argv, struct command *acmd,
630630
printf("Polling NVMe stats every %u sec(s); press Ctrl+C to stop\n\n",
631631
interval);
632632

633-
/* first snapshot becomes the baseline */
633+
/* print the initial absolute snapshot */
634+
if (flags & JSON)
635+
amzn_print_json_stats(&log, detail);
636+
else
637+
amzn_print_normal_stats(&log, detail);
638+
634639
prev = log;
635640
amzn_keep_polling = 1;
636641

0 commit comments

Comments
 (0)