1DBIPROF(1) User Contributed Perl Documentation DBIPROF(1)
2
3
4
6 dbiprof - command-line client for DBI::ProfileData
7
9 See a report of the ten queries with the longest total runtime in the
10 profile dump file prof1.out:
11
12 dbiprof prof1.out
13
14 See the top 10 most frequently run queries in the profile file dbi.prof
15 (the default):
16
17 dbiprof --sort count
18
19 See the same report with 15 entries:
20
21 dbiprof --sort count --number 15
22
24 This tool is a command-line client for the DBI::ProfileData. It allows
25 you to analyze the profile data file produced by DBI::ProfileDumper and
26 produce various useful reports.
27
29 This program accepts the following options:
30
31 --number N
32 Produce this many items in the report. Defaults to 10. If set to
33 "all" then all results are shown.
34
35 --sort field
36 Sort results by the given field. Sorting by multiple fields isn't
37 currently supported (patches welcome). The available sort fields
38 are:
39
40 total
41 Sorts by total time run time across all runs. This is the
42 default sort.
43
44 longest
45 Sorts by the longest single run.
46
47 count
48 Sorts by total number of runs.
49
50 first
51 Sorts by the time taken in the first run.
52
53 shortest
54 Sorts by the shortest single run.
55
56 key1
57 Sorts by the value of the first element in the Path, which
58 should be numeric. You can also sort by "key2" and "key3".
59
60 --reverse
61 Reverses the selected sort. For example, to see a report of the
62 shortest overall time:
63
64 dbiprof --sort total --reverse
65
66 --match keyN=value
67 Consider only items where the specified key matches the given
68 value. Keys are numbered from 1. For example, let's say you used
69 a DBI::Profile Path of:
70
71 [ DBIprofile_Statement, DBIprofile_Methodname ]
72
73 And called dbiprof as in:
74
75 dbiprof --match key2=execute
76
77 Your report would only show execute queries, leaving out prepares,
78 fetches, etc.
79
80 If the value given starts and ends with slashes ("/") then it will
81 be treated as a regular expression. For example, to only include
82 SELECT queries where key1 is the statement:
83
84 dbiprof --match key1=/^SELECT/
85
86 By default the match expression is matched case-insensitively, but
87 this can be changed with the --case-sensitive option.
88
89 --exclude keyN=value
90 Remove items for where the specified key matches the given value.
91 For example, to exclude all prepare entries where key2 is the
92 method name:
93
94 dbiprof --exclude key2=prepare
95
96 Like "--match", If the value given starts and ends with slashes
97 ("/") then it will be treated as a regular expression. For
98 example, to exclude UPDATE queries where key1 is the statement:
99
100 dbiprof --match key1=/^UPDATE/
101
102 By default the exclude expression is matched case-insensitively,
103 but this can be changed with the --case-sensitive option.
104
105 --case-sensitive
106 Using this option causes --match and --exclude to work case-
107 sensitively. Defaults to off.
108
109 --delete
110 Sets the "DeleteFiles" option to DBI::ProfileData which causes the
111 files to be deleted after reading. See DBI::ProfileData for more
112 details.
113
114 --dumpnodes
115 Print the list of nodes in the form of a perl data structure. Use
116 the "-sort" option if you want the list sorted.
117
118 --version
119 Print the dbiprof version number and exit.
120
122 Sam Tregar <sam@tregar.com>
123
125 Copyright (C) 2002 Sam Tregar
126
127 This program is free software; you can redistribute it and/or modify it
128 under the same terms as Perl 5 itself.
129
131 DBI::ProfileDumper, DBI::Profile, DBI.
132
133
134
135perl v5.32.1 2021-01-27 DBIPROF(1)