Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ipc::run3::profreporter(3pm) [debian man page]

IPC::Run3::ProfReporter(3pm)				User Contributed Perl Documentation			      IPC::Run3::ProfReporter(3pm)

NAME
IPC::Run3::ProfReporter - base class for handling profiling data SYNOPSIS
DESCRIPTION
See IPC::Run3::ProfPP and for an example subclass. This class just notes and accumulates times; subclasses use methods like "handle_app_call", "handle_run_exit" and "handle_app_exit" to emit reports on it. The default methods for these handlers are noops. If run from the command line, a reporter will be created and run on each logfile given as a command line parameter or on run3.out if none are given. This allows reports to be run like: perl -MIPC::Run3::ProfPP -e1 perl -MIPC::Run3::ProfPP -e1 foo.out bar.out Use "-" to read from STDIN (the log file format is meant to be moderately greppable): grep "^cvs " run3.out perl -MIPC::Run3::ProfPP -e1 - Use --app to show only application level statistics (ie don't emit a report section for each command run). METHODS
"IPC::Run3::ProfReporter->new" Returns a new profile reporting object. "$reporter->handle_app_call( ... )" "$reporter->handle_app_exit( ... )" "$reporter->handle_run_exit( ... )" These methods are called by the handled events (see below). "$reporter->app_call(@cmd, $time)" "$reporter->app_exit($time)" "$reporter->run_exit(@times)" $self->app_call( $time ); my $time = $self->get_app_call_time; Sets the time (in floating point seconds) when the application, run3(), or system() was called or exited. If no time parameter is passed, uses IPC::Run3's time routine. Use get_...() to retrieve these values (and _accum values, too). This is a separate method to speed the execution time of the setters just a bit. "$reporter->get_run_count()" "$reporter->get_app_call_time()" "$reporter->get_app_exit_time()" "$reporter->get_app_cmd()" "$reporter->get_app_time()" "$reporter->get_app_cumulative_time()" "$reporter->get_run_call_time()" "$reporter->get_run_exit_time()" "$reporter->get_run_time()" "$reporter->get_run_cumulative_time()" "$reporter->get_sys_call_time()" "$reporter->get_sys_exit_time()" "$reporter->get_sys_time()" "$reporter->get_sys_cumulative_time()" "$reporter->get_run_cmd()" LIMITATIONS
COPYRIGHT
Copyright 2003, R. Barrie Slaymaker, Jr., All Rights Reserved LICENSE
You may use this module under the terms of the BSD, Artistic, or GPL licenses, any version. AUTHOR
Barrie Slaymaker <barries@slaysys.com> perl v5.14.2 2011-12-23 IPC::Run3::ProfReporter(3pm)

Check Out this Related Man Page

x86_init(3)							     libdisasm							       x86_init(3)

NAME
x86_init, x86_cleanup - initialize and cleanup libdisasm SYNOPSIS
#include <libdis.h> typedef void (*DISASM_REPORTER)( enum x86_report_codes code, void * data, void * arg ); int x86_init( enum x86_options options, DISASM_REPORTER reporter, void * arg); int x86_cleanup(void); DESCRIPTION
enum x86_options { opt_none= 0, opt_ignore_nulls=1, /* ignore sequences of > 4 NULL bytes */ opt_16_bit=2, /* 16-bit/DOS disassembly */ opt_unknown }; enum x86_report_codes { report_disasm_bounds, report_insn_bounds, report_invalid_insn, report_unknown }; EXAMPLES
The following provides a skeleton for initializing and terminating libdisasm: void reporter( enum x86_report_codes code, void *data, void *arg ) { char * str = NULL; FILE *stream = (FILE *) arg; if (! stream ) stream = stderr; /* here would could examine the error and do something useful; * instead we just print that an error occurred */ switch ( code ) { case report_disasm_bounds: str = "Attempt to disassemble RVA " "beyond end of buffer"; break; case report_insn_bounds: str = "Instruction at RVA extends " "beyond buffer"; break; case report_invalid_insn: str = "Invalid opcode at RVA"; break; case report_unknown: str = "Unknown Error"; break; } fprintf(stream, "ERROR '%s:' %p0, str, data); } int main( int argc, char **argv ) { x86_init(opt_none, reporter, stderr); /* disassembler code goes here */ x86_cleanup(); } SEE ALSO
libdisasm(7), x86_disasm(3), x86_format_insn(3), x86dis(1) mammon_ 0.21 x86_init(3)
Man Page