Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form/Text.pm |
Statements | Executed 50 statements in 638µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
6 | 1 | 1 | 233µs | 575µs | new | Foswiki::Form::Text::
1 | 1 | 1 | 27µs | 34µs | BEGIN@4 | Foswiki::Form::Text::
1 | 1 | 1 | 19µs | 37µs | BEGIN@5 | Foswiki::Form::Text::
6 | 1 | 1 | 16µs | 16µs | CORE:subst (opcode) | Foswiki::Form::Text::
1 | 1 | 1 | 9µs | 9µs | BEGIN@7 | Foswiki::Form::Text::
0 | 0 | 0 | 0s | 0s | renderForEdit | Foswiki::Form::Text::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | package Foswiki::Form::Text; | ||||
3 | |||||
4 | 2 | 49µs | 2 | 41µs | # spent 34µs (27+7) within Foswiki::Form::Text::BEGIN@4 which was called:
# once (27µs+7µs) by Foswiki::Form::createField at line 4 # spent 34µs making 1 call to Foswiki::Form::Text::BEGIN@4
# spent 7µs making 1 call to strict::import |
5 | 2 | 49µs | 2 | 55µs | # spent 37µs (19+18) within Foswiki::Form::Text::BEGIN@5 which was called:
# once (19µs+18µs) by Foswiki::Form::createField at line 5 # spent 37µs making 1 call to Foswiki::Form::Text::BEGIN@5
# spent 18µs making 1 call to warnings::import |
6 | |||||
7 | 2 | 249µs | 1 | 9µs | # spent 9µs within Foswiki::Form::Text::BEGIN@7 which was called:
# once (9µs+0s) by Foswiki::Form::createField at line 7 # spent 9µs making 1 call to Foswiki::Form::Text::BEGIN@7 |
8 | 1 | 22µs | our @ISA = ('Foswiki::Form::FieldDefinition'); | ||
9 | |||||
10 | # spent 575µs (233+342) within Foswiki::Form::Text::new which was called 6 times, avg 96µs/call:
# 6 times (233µs+342µs) by Foswiki::Form::createField at line 311 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form.pm, avg 96µs/call | ||||
11 | 6 | 14µs | my $class = shift; | ||
12 | 6 | 79µs | 6 | 326µs | my $this = $class->SUPER::new(@_); # spent 326µs making 6 calls to Foswiki::Form::FieldDefinition::new, avg 54µs/call |
13 | 6 | 21µs | my $size = $this->{size} || ''; | ||
14 | 6 | 52µs | 6 | 16µs | $size =~ s/\D//g; # spent 16µs making 6 calls to Foswiki::Form::Text::CORE:subst, avg 3µs/call |
15 | 6 | 22µs | $size = 10 if ( !$size || $size < 1 ); | ||
16 | 6 | 14µs | $this->{size} = $size; | ||
17 | 6 | 44µs | return $this; | ||
18 | } | ||||
19 | |||||
20 | sub renderForEdit { | ||||
21 | my ( $this, $topicObject, $value ) = @_; | ||||
22 | |||||
23 | return ( | ||||
24 | '', | ||||
25 | CGI::textfield( | ||||
26 | -class => $this->cssClasses('foswikiInputField'), | ||||
27 | -name => $this->{name}, | ||||
28 | -size => $this->{size}, | ||||
29 | -value => $value | ||||
30 | ) | ||||
31 | ); | ||||
32 | } | ||||
33 | |||||
34 | 1 | 25µs | 1; | ||
35 | __END__ | ||||
# spent 16µs within Foswiki::Form::Text::CORE:subst which was called 6 times, avg 3µs/call:
# 6 times (16µs+0s) by Foswiki::Form::Text::new at line 14, avg 3µs/call |