← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/bin/epoll_server.pl
  Run on Wed Jan 5 05:34:33 2011
Reported on Wed Jan 5 05:41:44 2011

File /usr/lib/perl5/vendor_perl/5.10.1/HTTP/Body/OctetStream.pm
Statements Executed 13
Statement Execution Time 1.25ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1119.93ms28.0msHTTP::Body::OctetStream::::BEGIN@7HTTP::Body::OctetStream::BEGIN@7
111447µs454µsHTTP::Body::OctetStream::::BEGIN@5HTTP::Body::OctetStream::BEGIN@5
11130µs39µsHTTP::Body::OctetStream::::BEGIN@3HTTP::Body::OctetStream::BEGIN@3
11125µs203µsHTTP::Body::OctetStream::::BEGIN@4HTTP::Body::OctetStream::BEGIN@4
0000s0sHTTP::Body::OctetStream::::spinHTTP::Body::OctetStream::spin
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package HTTP::Body::OctetStream;
2
33266µs248µs
# spent 39µs (30+9) within HTTP::Body::OctetStream::BEGIN@3 which was called # once (30µs+9µs) by Catalyst::Engine::BEGIN@10 at line 3
use strict;
# spent 39µs making 1 call to HTTP::Body::OctetStream::BEGIN@3 # spent 9µs making 1 call to strict::import
4351µs2381µs
# spent 203µs (25+178) within HTTP::Body::OctetStream::BEGIN@4 which was called # once (25µs+178µs) by Catalyst::Engine::BEGIN@10 at line 4
use base 'HTTP::Body';
# spent 203µs making 1 call to HTTP::Body::OctetStream::BEGIN@4 # spent 178µs making 1 call to base::import
53471µs2460µs
# spent 454µs (447+7) within HTTP::Body::OctetStream::BEGIN@5 which was called # once (447µs+7µs) by Catalyst::Engine::BEGIN@10 at line 5
use bytes;
# spent 454µs making 1 call to HTTP::Body::OctetStream::BEGIN@5 # spent 7µs making 1 call to bytes::import
6
73457µs328.3ms
# spent 28.0ms (9.93+18.1) within HTTP::Body::OctetStream::BEGIN@7 which was called # once (9.93ms+18.1ms) by Catalyst::Engine::BEGIN@10 at line 7
use File::Temp 0.14;
# spent 28.0ms making 1 call to HTTP::Body::OctetStream::BEGIN@7 # spent 119µs making 1 call to Exporter::import # spent 100µs making 1 call to UNIVERSAL::VERSION
8
9=head1 NAME
10
11HTTP::Body::OctetStream - HTTP Body OctetStream Parser
12
13=head1 SYNOPSIS
14
15 use HTTP::Body::OctetStream;
16
17=head1 DESCRIPTION
18
19HTTP Body OctetStream Parser.
20
21=head1 METHODS
22
23=over 4
24
25=item spin
26
27=cut
28
29sub spin {
30 my $self = shift;
31
32 unless ( $self->body ) {
33 $self->body( File::Temp->new( DIR => $self->tmpdir ) );
34 }
35
36 if ( my $length = length( $self->{buffer} ) ) {
37 $self->body->write( substr( $self->{buffer}, 0, $length, '' ), $length );
38 }
39
40 if ( $self->length == $self->content_length ) {
41 seek( $self->body, 0, 0 );
42 $self->state('done');
43 }
44}
45
46=back
47
48=head1 AUTHOR
49
50Christian Hansen, C<ch@ngmedia.com>
51
52=head1 LICENSE
53
54This library is free software . You can redistribute it and/or modify
55it under the same terms as perl itself.
56
57=cut
58
5914µs1;