DBIPROFSection: User Contributed Perl Documentation (1)
Index Return to Main Contents
NAMEdbiprof - command-line client for DBI::ProfileData
SYNOPSISSee a report of the ten queries with the longest total runtime in the profile dump file prof1.out:
See the top 10 most frequently run queries in the profile file dbi.prof (the default):
dbiprof --sort count
See the same report with 15 entries:
dbiprof --sort count --number 15
DESCRIPTIONThis tool is a command-line client for the DBI::ProfileData. It allows you to analyze the profile data file produced by DBI::ProfileDumper and produce various useful reports.
OPTIONSThis program accepts the following options:
- --number N
- Produce this many items in the report. Defaults to 10. If set to ``all'' then all results are shown.
- --sort field
Sort results by the given field. The available sort fields are:
Reverses the selected sort. For example, to see a report of the
shortest overall time:
dbiprof --sort total --reverse
- --match keyN=value
Consider only items where the specified key matches the given value.
Keys are numbered from 1. For example, let's say you used a
DBI::Profile Path of:
[ DBIprofile_Statement, DBIprofile_Methodname ]
And called dbiprof as in:
dbiprof --match key2=execute
Your report would only show execute queries, leaving out prepares, fetches, etc.
If the value given starts and ends with slashes ("/") then it will be treated as a regular expression. For example, to only include SELECT queries where key1 is the statement:
dbiprof --match key1=/^SELECT/
By default the match expression is matched case-insensitively, but this can be changed with the --case-sensitive option.
- --exclude keyN=value
Remove items for where the specified key matches the given value. For
example, to exclude all prepare entries where key2 is the method name:
dbiprof --exclude key2=prepare
Like "--match", If the value given starts and ends with slashes ("/") then it will be treated as a regular expression. For example, to exclude UPDATE queries where key1 is the statement:
dbiprof --match key1=/^UPDATE/
By default the exclude expression is matched case-insensitively, but this can be changed with the --case-sensitive option.
- Using this option causes --match and --exclude to work case-sensitively. Defaults to off.
- Print the dbiprof version number and exit.
AUTHORSam Tregar <firstname.lastname@example.org>
COPYRIGHT AND LICENSECopyright (C) 2002 Sam Tregar
SEE ALSODBI::ProfileDumper, DBI::Profile, DBI.