Devel::NYTProf::Callgrind::Ticks - Represents a mesh of Ticks read from a callgrind file
This class is mainly for TicksDiff but you can also use it alone to load and save callgrind files.
With this class you may find via getBlockEquivalent() the same callgrind block in a file by using a different callgrind file as reference to compare the values.
Or you want to manipulate callgrind files by changing values or adding blocks. If you plan to write any kind of ticks analysis this class might be helpull. Then maybe getBlocksAsArray() is usefull.
Moose
$this->new();
$this->BUILD();
$this->addBlock(\%$block);
Adds a block. For example you start with an empty object and wants to add blocks from a different object. It will replace an existing block if the definition existists already. So addBlock can also be used to update a block. If you update an existing block, it does break the reference to the given hashref, it makes a copy of the values. So do not use the original hash then but use the method of this class to get the callgrind text.
my $text = $this->getAsText();
Returns the callgrind text
my \%block = $this->getBlockEquivalent(\%block);
returns the equivalent block in that object to a given strange block (from a different object). Returns undef if not found.
my \@list = $this->getBlocksAsArray();
Is the same as list(). It returns an ArrayRef of the blocks (HashRefs).
$this->loadFile($filename);
Loads the callgrind file into memory and starts internal indexing of the blocks.
$this->saveFile($filename);
Save the data to a callgrind file. The event type will be 'Ticks', nothing else.
You can redistribute it and/or modify it under the conditions of LGPL and Artistic Licence.
Andreas Hernitscheck - ahernit AT cpan.org
To install Devel::NYTProf::Callgrind::TicksDiff, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::NYTProf::Callgrind::TicksDiff
CPAN shell
perl -MCPAN -e shell install Devel::NYTProf::Callgrind::TicksDiff
For more information on module installation, please visit the detailed CPAN module installation guide.