pgbench: Show better progress when loading tuples

Show target number of tuples and percentage in addition to current
number.
This commit is contained in:
Peter Eisentraut 2012-09-05 23:07:47 -04:00
parent ab9a14e903
commit 4c60b80094

View File

@ -1420,7 +1420,9 @@ init(bool is_no_vacuum)
} }
if (j % 100000 == 0) 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")) if (PQputline(con, "\\.\n"))
{ {