From: Peter Eisentraut Date: Thu, 6 Sep 2012 03:07:47 +0000 (-0400) Subject: pgbench: Show better progress when loading tuples X-Git-Tag: REL9_3_BETA1~927 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c60b80094009c6f8ed9ccee365e445f07e609ab;p=postgresql pgbench: Show better progress when loading tuples Show target number of tuples and percentage in addition to current number. --- diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 00cab73f90..f5ac3b1c6d 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1420,7 +1420,9 @@ init(bool is_no_vacuum) } if (j % 100000 == 0) - fprintf(stderr, "%d tuples done.\n", j); + fprintf(stderr, "%d of %d tuples (%d%%) done.\n", + j, naccounts * scale, + j * 100 / (naccounts * scale)); } if (PQputline(con, "\\.\n")) {