DBIPROF(1p)
π DBIPROF β the 1p manual page, bestie edition π
okay so. this is dbiprof, a command-line client for DBI::ProfileData, living in the User Contributed Perl Documentation corner of the 1p section. it's the lil bestie you call when you wanna know which of your queries is out here wasting your whole entire life. π΅οΈβοΈβ¨
β¨ NAME β¨
dbiprof β command-line client for DBI::ProfileData π
πΈ SYNOPSIS πΈ
Wanna see a report of the ten queries with the longest total runtime in the profile dump file prof1.out? say less:
dbiprof prof1.out
Wanna see the top 10 most frequently run queries in the profile file dbi.prof (which is, btw, the default)? boom:
dbiprof --sort count
And the same report but with 15 entries? okay queen, expand your vision:
dbiprof --sort count --number 15
π¦ DESCRIPTION π¦
So the way this works: this tool is a command-line client for the DBI::ProfileData. it lets you analyze the profile data file produced by DBI::ProfileDumper and produce various useful reports. that's it, that's the whole vibe. it's giving "detective but make it perl". ππ
π OPTIONS π
This program accepts the following options, and yes bestie we're going through every single one, no skimming:
--number Nβ produce this many items in the report. defaults to10. and if you set it to"all"then all results are shown, every last one, the whole buffet. π--sort fieldβ sort results by the given field. sorting by multiple fields isn't currently supported (patches welcome β they literally said it, not me). the available sort fields are:totalβ sorts by total time run time across all runs. this is the default sort, the main character. βlongestβ sorts by the longest single run.countβ sorts by total number of runs.firstβ sorts by the time taken in the first run.shortestβ sorts by the shortest single run.key1β sorts by the value of the first element in the Path, which should be numeric. you can also sort by"key2"and"key3". slay, options within options. π
--reverseβ 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 from1. for example, let's say you used aDBI::ProfilePath 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. like a filter but make it fashion. π
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. iykyk. π
--exclude keyN=valueβ remove items for where the specified key matches the given value. for example, to exclude all prepare entries wherekey2is 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.
--case-sensitiveβ using this option causes--matchand--excludeto work case-sensitively. defaults to off. capital letters MATTER now. π--deleteβ sets the"DeleteFiles"option toDBI::ProfileDatawhich causes the files to be deleted after reading. seeDBI::ProfileDatafor more details. (yes this really deletes them, no cap β go read the docs, bestie. π)--dumpnodesβ print the list of nodes in the form of a perl data structure. use the"-sort"option if you want the list sorted. raw data main character energy. π₯--versionβ print thedbiprofversion number and exit. a lil mic drop and out. π
π«Ά AUTHOR π«Ά
Sam Tregar <sam@tregar.com> β the icon, the legend, the moment. π
πΊ COPYRIGHT AND LICENSE πΊ
Copyright (C) 2002 Sam Tregar
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
β SEE ALSO β
DBI::ProfileDumper, DBI::Profile, DBI. the whole friend group, go say hi. π¦
and that's the page bestie!! written for perl v5.42.3, dated 2026-08-19, and stamped DBIPROF(1p) right at the top where it belongs. now go profile something and find out which query is lowkey ruining your life. πβ¨π
π¦ where this page comes from
- ubuntu stonking: libdbi-perl 1.652-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms