1 package IPC::Run3::ProfLogger;
7 IPC::Run3::ProfLogger - write profiling data to a log file
11 use IPC::Run3::ProfLogger;
13 my $logger = IPC::Run3::ProfLogger->new; ## write to "run3.out"
14 my $logger = IPC::Run3::ProfLogger->new( Destination => $fn );
16 $logger->app_call( \@cmd, $time );
18 $logger->run_exit( \@cmd1, @times1 );
19 $logger->run_exit( \@cmd1, @times1 );
21 $logger->app_exit( $time );
25 Used by IPC::Run3 to write a profiling log file. Does not
26 generate reports or maintain statistics; its meant to have minimal
29 Its API is compatible with a tiny subset of the other IPC::Run profiling
38 =head2 C<< IPC::Run3::ProfLogger->new( ... ) >>
43 my $class = ref $_[0] ? ref shift : shift;
44 my $self = bless { @_ }, $class;
46 $self->{Destination} = "run3.out"
47 unless defined $self->{Destination} && length $self->{Destination};
49 open PROFILE, ">$self->{Destination}"
50 or die "$!: $self->{Destination}\n";
52 $self->{FH} = *PROFILE{IO};
58 =head2 C<< $logger->run_exit( ... ) >>
86 =head2 C<< $logger->app_exit( $arg ) >>
93 print $fh "\\app_exit ", shift, "\n";
96 =head2 C<< $logger->app_call( $t, @args) >>
102 my $fh = $self->{FH};
126 Copyright 2003, R. Barrie Slaymaker, Jr., All Rights Reserved
130 You may use this module under the terms of the BSD, Artistic, or GPL licenses,
135 Barrie Slaymaker E<lt>barries@slaysys.comE<gt>