diff options
| author | Tatsuo Ishii <ishii@postgresql.org> | 2007-04-06 09:16:16 +0000 |
|---|---|---|
| committer | Tatsuo Ishii <ishii@postgresql.org> | 2007-04-06 09:16:16 +0000 |
| commit | e574f2a029d707201aad307983fa74972aceab4a (patch) | |
| tree | 6297847d5c2982b798e0a0a7ebc8ab4f29f8df14 /contrib/pgbench/README.pgbench | |
| parent | 7e96269a82d0f92db6066b1e30df5931ac1ad130 (diff) | |
| download | postgresql-e574f2a029d707201aad307983fa74972aceab4a.tar.gz | |
Enhance pgbench -l option to add timestamp. Patch contributed by Greg
Smith. Along with Japanese doc updation by Tasuo Ishii.
> This patch changes the way pgbench outputs its latency log files so that
> every transaction gets a timestamp and notes which transaction type was
> executed. It's a one-line change that just dumps some additional
> information that was already sitting in that area of code. I also made a
> couple of documentation corrections and clarifications on some of the more
> confusing features of pgbench.
>
> It's straightforward to parse log files in this format to analyze what
> happened during the test at a higher level than was possible with the
> original format. You can find some rough sample code to convert this
> latency format into CVS files and then into graphs at
> http://www.westnet.com/~gsmith/content/postgresql/pgbench.htm which I'll
> be expanding on once I get all my little patches sent in here.
Diffstat (limited to 'contrib/pgbench/README.pgbench')
| -rw-r--r-- | contrib/pgbench/README.pgbench | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/contrib/pgbench/README.pgbench b/contrib/pgbench/README.pgbench index 7fc683cef0..ef040c094d 100644 --- a/contrib/pgbench/README.pgbench +++ b/contrib/pgbench/README.pgbench @@ -1,4 +1,4 @@ -$PostgreSQL: pgsql/contrib/pgbench/README.pgbench,v 1.16 2007/04/06 08:49:44 ishii Exp $ +$PostgreSQL: pgsql/contrib/pgbench/README.pgbench,v 1.17 2007/04/06 09:16:15 ishii Exp $ pgbench README @@ -96,10 +96,14 @@ o options default is 1. NOTE: scaling factor should be at least as large as the largest number of clients you intend to test; else you'll mostly be measuring update contention. + Regular (not initializing) runs using one of the + built-in tests will detect scale based on the number of + branches in the database. For custom (-f) runs it can + be manually specified with this parameter. -D varname=value - Define a variable. It can be refereed to by a script - provided by using -f option. Multile -D options are allowed. + Define a variable. It can be refered to by a script + provided by using -f option. Multiple -D options are allowed. -U login Specify db user's login name if it is different from @@ -141,9 +145,22 @@ o options with the name "pgbench_log.xxx", where xxx is the PID of the pgbench process. The format of the log is: - client_id transaction_no time + client_id transaction_no time file_no time-epoch time-us - where time is measured in microseconds. + where time is measured in microseconds, , the file_no is + which test file was used (useful when multiple were + specified with -f), and time-epoch/time-us are a + UNIX epoch format timestamp followed by an offset + in microseconds (suitable for creating a ISO 8601 + timestamp with a fraction of a second) of when + the transaction completed. + + Here are example outputs: + + 0 199 2241 0 1175850568 995598 + 0 200 2465 0 1175850568 998079 + 0 201 2513 0 1175850569 608 + 0 202 2038 0 1175850569 2663 -d debug option. @@ -165,6 +182,8 @@ o What is the "transaction" actually performed in pgbench? (7) end; +If you specify -N, (4) and (5) aren't included in the transaction. + o -f option This supports for reading transaction script from a specified |
