← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Sun Nov 5 02:36:06 2017
Reported on Sun Nov 5 02:56:21 2017

Filename/usr/local/lib/perl5/site_perl/mach/5.24/Razor2/Engine/VR8.pm
StatementsExecuted 7 statements in 845µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1113.94ms4.09msRazor2::Engine::VR8::::BEGIN@2Razor2::Engine::VR8::BEGIN@2
11139µs180µsRazor2::Engine::VR8::::BEGIN@3Razor2::Engine::VR8::BEGIN@3
11133µs152µsRazor2::Engine::VR8::::BEGIN@4Razor2::Engine::VR8::BEGIN@4
0000s0sRazor2::Engine::VR8::::newRazor2::Engine::VR8::new
0000s0sRazor2::Engine::VR8::::signatureRazor2::Engine::VR8::signature
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Razor2::Engine::VR8;
22346µs14.09ms
# spent 4.09ms (3.94+149µs) within Razor2::Engine::VR8::BEGIN@2 which was called: # once (3.94ms+149µs) by Razor2::Client::Engine::BEGIN@7 at line 2
use Razor2::Signature::Whiplash;
# spent 4.09ms making 1 call to Razor2::Engine::VR8::BEGIN@2
3285µs2321µs
# spent 180µs (39+141) within Razor2::Engine::VR8::BEGIN@3 which was called: # once (39µs+141µs) by Razor2::Client::Engine::BEGIN@7 at line 3
use Razor2::String qw(hextobase64);
# spent 180µs making 1 call to Razor2::Engine::VR8::BEGIN@3 # spent 141µs making 1 call to Exporter::import
42409µs2272µs
# spent 152µs (33+119) within Razor2::Engine::VR8::BEGIN@4 which was called: # once (33µs+119µs) by Razor2::Client::Engine::BEGIN@7 at line 4
use Data::Dumper;
# spent 152µs making 1 call to Razor2::Engine::VR8::BEGIN@4 # spent 119µs making 1 call to Exporter::import
5
6sub new {
7
8 my ($class, %args) = @_;
9
10 my $self = bless {
11 description => 'whiplash',
12 has_greet_param => 0,
13 whiplash => new Razor2::Signature::Whiplash,
14 rm => $args{RM},
15 }, $class;
16
17 die unless $self;
18
19 return $self;
20
21}
22
23
24sub signature {
25
26 my ($self, $text) = @_;
27 my ($sigs, $meta) = $self->{whiplash}->whiplash($$text);
28
29 my @sigs_to_return;
30 return unless $sigs;
31
32 if (scalar @$sigs) {
33 for (@$sigs) {
34 push @sigs_to_return, hextobase64($_);
35 }
36 } else {
37 return;
38 }
39
40 return \@sigs_to_return;
41
42}
43
4416µs1;
45