debian/0000755000000000000000000000000012066345514007174 5ustar debian/rules0000755000000000000000000000003612066345514010253 0ustar #!/usr/bin/make -f %: dh $@ debian/control0000644000000000000000000000257012066345514010603 0ustar Source: libdbix-profile-perl Maintainer: Debian Perl Group Uploaders: Ivan Kohler , Xavier Guimard Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: libdbi-perl, perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libdbix-profile-perl.git Vcs-Git: git://git.debian.org/pkg-perl/packages/libdbix-profile-perl.git Homepage: http://search.cpan.org/dist/DBIx-Profile/ Package: libdbix-profile-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl Description: DBI query profiler DBIx::Profile is a quick and easy, and mostly transparent, profiler for scripts using DBI. It collects information on the query level, and keeps track of first, failed, normal, and total amounts (count, wall clock, CPU time) for each function on the query. . NOTE: DBIx::Profile use Time::HiRes to clock the wall time and the old standby times() to clock the CPU time. The CPU time is pretty coarse. . DBIx::Profile can also trace the execution of queries. It will print a timestamp and the query that was called. This is optional, and occurs only when the environment variable DBIXPROFILETRACE is set to 1. (ex: (bash) export DBIXPROFILETRACE=1). debian/source/0000755000000000000000000000000012066345514010474 5ustar debian/source/format0000644000000000000000000000001412066345514011702 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000234612066345514011053 0ustar libdbix-profile-perl (1.0-4) unstable; urgency=low * Take over for the Debian Perl Group on maintainer's request (http://bugs.debian.org/677732#10) * Update source format to 3.0 (quilt) * Add debian/watch file * Update debian/copyright (years and format) * Bump Standards-Version to 3.9.4 * Bump debhelper compatibility to 8 * Transform old patch in 3 quilt patches and update README.Debian * Add basic test * Update debian/rules to use "dh $@" -- Xavier Guimard Tue, 25 Dec 2012 09:07:00 +0100 libdbix-profile-perl (1.0-3) unstable; urgency=low * debian/copyright pedantry (closes: Bug#153331, Bug#153392) * binary-arch vs. binary-indep (closes: Bug#153353) * updated description from ddtp (closes: Bug#156303) * remove spurious files in .diff (closes: Bug#153395) -- Ivan Kohler Sat, 7 Sep 2002 05:07:05 -0700 libdbix-profile-perl (1.0-2) unstable; urgency=low * corrected spelling in description and manpage (closes: Bug#124932) -- Ivan Kohler Mon, 17 Dec 2001 15:27:35 -0800 libdbix-profile-perl (1.0-1) unstable; urgency=low * Initial Release (closes: Bug#103669) -- Ivan Kohler Sun, 8 Jul 2001 15:59:58 -0700 debian/compat0000644000000000000000000000000212066345514010372 0ustar 8 debian/README.Debian0000644000000000000000000000030112066345514011227 0ustar The debian package differs from upstream in two ways: patches provides: * a MANIFEST file * a small patch to add a `sprintf' method to return the profiling information instead of print it. debian/patches/0000755000000000000000000000000012066345514010623 5ustar debian/patches/spelling-errors.patch0000644000000000000000000000165512066345514015002 0ustar Description: Spelling errors Author: Ivan Kohler Bug: https://rt.cpan.org/Ticket/Display.html?id=82215 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=82215 Reviewed-By: Xavier Guimard Last-Update: 2012-12-25 --- a/Profile.pm +++ b/Profile.pm @@ -64,10 +64,10 @@ DBIx::Profile is a quick and easy, and mostly transparent, profiler for scripts using DBI. It collects information on the query level, and keeps track of first, failed, normal, and total amounts - (count, wall clock, cput time) for each function on the query. + (count, wall clock, CPU time) for each function on the query. NOTE: DBIx::Profile use Time::HiRes to clock the wall time and - the old standby times() to clock the cpu time. The cpu time is + the old standby times() to clock the CPU time. The CPU time is pretty coarse. DBIx::Profile can also trace the execution of queries. It will print debian/patches/add-manifest.patch0000644000000000000000000000053112066345514014177 0ustar Description: Add MANIFEST file Author: Ivan Kohler Bug: https://rt.cpan.org/Ticket/Display.html?id=82215 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=82215 Reviewed-By: Xavier Guimard Last-Update: 2012-12-25 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,4 @@ +Makefile.PL +Profile.pm +README +MANIFEST debian/patches/series0000644000000000000000000000016412066345514012041 0ustar add-basic-test.patch add-manifest.patch spelling-errors.patch add-sprintf-method-to-return-the-profiling-data.patch debian/patches/add-basic-test.patch0000644000000000000000000000110612066345514014426 0ustar Description: Add basic test Author: Xavier Guimard Bug: https://rt.cpan.org/Ticket/Display.html?id=82216 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=82216 Last-Update: 2012-12-23 --- /dev/null +++ b/t/01-basic-test.t @@ -0,0 +1,11 @@ +# Before `make install' is performed this script should be runnable with +# `make test'. After `make install' it should work as `perl Lemonldap-NG-Portal.t' + +######################### + +# change 'tests => 1' to 'tests => last_test_to_print'; + +use Test::More tests => 1; + +BEGIN { use_ok( 'DBIx::Profile' ) } + debian/patches/add-sprintf-method-to-return-the-profiling-data.patch0000644000000000000000000000232412066345514022747 0ustar Description: Add sprintf method to return the profiling data instead of print it Author: Ivan Kohler Bug: https://rt.cpan.org/Public/Bug/Display.html?id=738 Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=738 Reviewed-By: Xavier Guimard Last-Update: 2012-12-23 --- a/Profile.pm +++ b/Profile.pm @@ -225,9 +225,16 @@ # JEFF - The printing and the print code is kinda (er... very) ugly! # +#like printProfile, except returns the results instead of printing them. +sub sprintProfile { + my $self = shift; + $self->printProfile({'sprint'=>1}); +} + sub printProfile { my $self = shift; + my $args = shift; my %result; my $total = 0; no integer; @@ -292,13 +299,18 @@ $result{$total} = $text; } # each query + my $results; foreach my $qry (sort stripsort keys %result) { - if ($DBIx::Profile::DBIXFILE eq "" ) { + if ( $args->{'sprint'} ) { + $results .= $result{$qry} . "\n"; + } elsif ($DBIx::Profile::DBIXFILE eq "" ) { warn $result{$qry} . "\n"; } else { print $DBIx::Profile::DBIXFILEHANDLE $result{$qry} . "\n"; } } + + return $results if $args->{'sprint'}; } sub stripsort { debian/copyright0000644000000000000000000000217012066345514011127 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: DBIx-Profile Source: http://search.cpan.org/dist/DBIx-Profile/ Upstream-Contact: Jeff Lathan, lathan@pobox.com Files: * Copyright: 1999-2000, Jeff Lathan, lathan@pobox.com 1999-2000, Kerry Clendinning, kerry@deja.com License: Artistic or GPL-1+ Files: debian/* Copyright: 2001, 2002, Ivan Kohler 2012, Xavier Guimard License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/watch0000644000000000000000000000016112066345514010223 0ustar version=3 http://search.cpan.org/dist/DBIx-Profile/ .*/DBIx-Profile-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)