summaryrefslogtreecommitdiff
path: root/contrib/pgbench
diff options
context:
space:
mode:
authorPeter Eisentraut2012-09-06 03:07:47 +0000
committerPeter Eisentraut2012-09-06 03:07:47 +0000
commit4c60b80094009c6f8ed9ccee365e445f07e609ab (patch)
tree2214477107016edb8e1b9be1d44ffd2cb2f01e4c /contrib/pgbench
parentab9a14e903347929d248ac4dabe2614de482350b (diff)
pgbench: Show better progress when loading tuples
Show target number of tuples and percentage in addition to current number.
Diffstat (limited to 'contrib/pgbench')
-rw-r--r--contrib/pgbench/pgbench.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 00cab73f909..f5ac3b1c6d6 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"))
{