-
-
18 Mar 2010 20:07:04 UTC
- Distribution: Time-Stats
- Module version: 1.0
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (432 / 0 / 0)
- Kwalitee
Bus factor: 0- 28.30% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (2.08KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Time::Stats - Easy timing info
SYNOPSIS
use Time::Stats;
clear();
mark();
stats();
# If you don't want to import the above methods:
use Time::Stats ();
Time::Stats::clear(); Time::Stats::mark(); Time::Stats::stats();
DESCRIPTION
This module is designed to make it very easy to get timing info for your code, ala Time::HiRes, without needing to remember tv_interval and [gettimeofday], or writing your own methods for processing data. This is mainly useful if DProf doesn't give you useful info on what's slowing you down, and you need to inspect larger sections of code.
It's pretty smart about loops and being used in persistent environments such as mod_perl.
- mark( [$name] )
-
Flags a point in the code to pay attention to. Times will be reported for the code in between two calls to mark within the same file. If the calls to mark are inside of a loop, the times between two calls to mark will be summed.
Takes an optional scalar mark name which will label the time that this mark completes in the output generated by stats(). If no name is passed, output will be labeled by line number.
- clear()
-
Removes all data currently tracked, in all files.
- stats()
-
Prints a synopsis to STDERR. This displays time per file, with the slowest intervals sorted to the top of each file.
AUTHOR
Patrick A. Michaud, <vegitron@gmail.com>
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Time::Stats, copy and paste the appropriate command in to your terminal.
cpanm Time::Stats
perl -MCPAN -e shell install Time::Stats
For more information on module installation, please visit the detailed CPAN module installation guide.