/usr/share/perl5/Mail/MtPolicyd/Profiler.pm is in mtpolicyd 2.02-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | package Mail::MtPolicyd::Profiler;
use strict;
use warnings;
use MooseX::Singleton;
use namespace::autoclean;
use Mail::MtPolicyd::Profiler::Timer;
use JSON;
our $VERSION = '2.02'; # VERSION
# ABSTRACT: a application level profiler for mtpolicyd
has 'root' => ( is => 'rw', isa => 'Mail::MtPolicyd::Profiler::Timer',
lazy => 1,
default => sub {
Mail::MtPolicyd::Profiler::Timer->new( name => 'main timer' );
},
);
has 'current' => (
is => 'rw', isa => 'Mail::MtPolicyd::Profiler::Timer',
handles => {
'tick' => 'tick',
},
lazy => 1,
default => sub {
my $self = shift;
return $self->root;
},
);
sub reset {
my ( $self, $name ) = @_;
my $timer = Mail::MtPolicyd::Profiler::Timer->new( name => 'main timer' );
$self->root( $timer );
$self->current( $timer );
return;
}
sub new_timer {
my ( $self, $name ) = @_;
my $timer = $self->current->new_child( name => $name );
$self->current( $timer );
return;
}
sub stop_current_timer {
my ( $self, $name ) = @_;
$self->current->stop;
if( defined $self->current->parent ) {
$self->current($self->current->parent);
}
return;
}
sub to_string {
my $self = shift;
return $self->root->to_string;
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Mail::MtPolicyd::Profiler - a application level profiler for mtpolicyd
=head1 VERSION
version 2.02
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
=cut
|