Rebuilding Repository for Bachelor thesis
This commit is contained in:
commit
b095814840
117 changed files with 37459 additions and 0 deletions
115
Umsetzung/Perl/Kieker/Controlling.pm
Normal file
115
Umsetzung/Perl/Kieker/Controlling.pm
Normal file
|
@ -0,0 +1,115 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Controlling;
|
||||
|
||||
use Kieker::Record::Trace;
|
||||
use Kieker::Writer::JMSWriter;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Controlling - Provides Controlling mechanisms to Kieker Modules
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Kieker::Controlling;
|
||||
my $control = Kieker::Controlling->instance(); # Get controlling instance
|
||||
|
||||
my $trace = $control->getTrace(); # Get current traceID
|
||||
|
||||
my $orderId = $control->getOrderIndex($trace); # Get current orderIndex
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module provides controlling methods for Kieker. The main functions are
|
||||
providing consistent trace and orderIDs. When new traces are created the
|
||||
corresponding traceEvents are created and written.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $control = Kieker::Controlling->instance();
|
||||
|
||||
Returns the singleton instance of Kieker::Controlling. If no instance is defined
|
||||
a new instance is created.
|
||||
|
||||
=cut
|
||||
|
||||
my $oneTrueSelf;
|
||||
|
||||
sub instance {
|
||||
# check singleton
|
||||
unless (defined $oneTrueSelf) {
|
||||
my ($type) = @_;
|
||||
my $this = {};
|
||||
|
||||
$oneTrueSelf = bless $this, $type;
|
||||
}
|
||||
return $oneTrueSelf;
|
||||
}
|
||||
|
||||
=head2 my $orderId = $control->getOrderIndex($trace);
|
||||
|
||||
Returns the current orderIndex and increments the count. If this is the first
|
||||
request a new traceEvent is created and written to the log.
|
||||
|
||||
=cut
|
||||
|
||||
sub getOrderIndex {
|
||||
my ($self, $trace) = @_;
|
||||
|
||||
if (defined ($self->{$trace})) {
|
||||
my $orderIndex = $self->{$trace} + 1;
|
||||
$self->{$trace} = $orderIndex;
|
||||
return $orderIndex;
|
||||
} else {
|
||||
my $kieker_writer = Kieker::Writer::JMSWriter->instance();
|
||||
my $kieker_record = Kieker::Record::Trace->new($trace);
|
||||
$kieker_writer->write($kieker_record->genoutput());
|
||||
$self->{$trace} = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
=head2 my $trace = $control->getTrace();
|
||||
|
||||
Returns the current traceID. In this version it uses the threadID and relies on
|
||||
special Apache configuration.
|
||||
|
||||
=cut
|
||||
|
||||
sub getTrace {
|
||||
return $$;
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
109
Umsetzung/Perl/Kieker/Controlling.pm.htm
Normal file
109
Umsetzung/Perl/Kieker/Controlling.pm.htm
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Controlling - Provides Controlling mechanisms to Kieker Modules</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_control___kieker__controlling__instance___">$control = Kieker::Controlling-><code>instance()</code>;</a></li>
|
||||
<li><a href="#my__orderid____control__getorderindex__trace__">my $orderId = $control-><code>getOrderIndex($trace)</code>;</a></li>
|
||||
<li><a href="#my__trace____control__gettrace___">my $trace = $control-><code>getTrace()</code>;</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Controlling - Provides Controlling mechanisms to Kieker Modules</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
use Kieker::Controlling;
|
||||
my $control = Kieker::Controlling->instance(); # Get controlling instance</pre>
|
||||
<pre>
|
||||
my $trace = $control->getTrace(); # Get current traceID</pre>
|
||||
<pre>
|
||||
my $orderId = $control->getOrderIndex($trace); # Get current orderIndex</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>This module provides controlling methods for Kieker. The main functions are
|
||||
providing consistent trace and orderIDs. When new traces are created the
|
||||
corresponding traceEvents are created and written.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_control___kieker__controlling__instance___">$control = Kieker::Controlling-><code>instance()</code>;</a></h2>
|
||||
<p>Returns the singleton instance of Kieker::Controlling. If no instance is defined
|
||||
a new instance is created.</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="my__orderid____control__getorderindex__trace__">my $orderId = $control-><code>getOrderIndex($trace)</code>;</a></h2>
|
||||
<p>Returns the current orderIndex and increments the count. If this is the first
|
||||
request a new traceEvent is created and written to the log.</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="my__trace____control__gettrace___">my $trace = $control-><code>getTrace()</code>;</a></h2>
|
||||
<p>Returns the current traceID. In this version it uses the threadID and relies on
|
||||
special Apache configuration.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
92
Umsetzung/Perl/Kieker/Record/OperationEntryEvent.pm
Normal file
92
Umsetzung/Perl/Kieker/Record/OperationEntryEvent.pm
Normal file
|
@ -0,0 +1,92 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Record::OperationEntryEvent;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Record::OperationEntryEvent - Kieker Event to be produced at the start
|
||||
of a function call.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $record = Kieker::Record::OperationEntryEvent->new(
|
||||
Kieker::Util->time(),
|
||||
$control->getTrace(),
|
||||
$control->getOrderIndex($control->getTrace()),
|
||||
$functionName,$packageName);
|
||||
$writer->write($record->genoutput());
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Generates a OperationEntryEvent. This Event should be generated at the start of
|
||||
each monitored function.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $record = Kieker::Record::OperationEntryEvent->new(timestamp, trace, orderIndex, function, package);
|
||||
|
||||
Creates a new Record. It needs a timestamp, a trace with its corresponding
|
||||
orderIndex, a function name and a package name.
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my ($type, $timest, $traceID, $orderID, $funName, $packName) = @_;
|
||||
my $this = {
|
||||
timestamp => $timest,
|
||||
traceID => $traceID,
|
||||
orderIndex => $orderID,
|
||||
functionName => $funName,
|
||||
packageName => $packName
|
||||
};
|
||||
|
||||
return bless($this,$type);
|
||||
}
|
||||
|
||||
=head2 $string = $record->genoutput();
|
||||
|
||||
Serializes the record for output. Returns the serialized form of the record.
|
||||
Uses the identifier "1" for the event type.
|
||||
|
||||
=cut
|
||||
|
||||
sub genoutput {
|
||||
my ($self) = @_;
|
||||
return
|
||||
"1;".$self->{timestamp}.";".$self->{traceID}.";".
|
||||
$self->{orderIndex}.";".$self->{functionName}.";".$self->{packageName};
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
104
Umsetzung/Perl/Kieker/Record/OperationEntryEvent.pm.htm
Normal file
104
Umsetzung/Perl/Kieker/Record/OperationEntryEvent.pm.htm
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Record::OperationEntryEvent - Kieker Event to be produced at the start
|
||||
of a function call.</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_record___kieker__record__operationentryevent__new_timestamp__trace__orderindex__function__package__">$record = Kieker::Record::OperationEntryEvent->new(timestamp, trace, orderIndex, function, package);</a></li>
|
||||
<li><a href="#_string____record__genoutput___">$string = $record-><code>genoutput()</code>;</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Record::OperationEntryEvent - Kieker Event to be produced at the start
|
||||
of a function call.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
my $record = Kieker::Record::OperationEntryEvent->new(
|
||||
Kieker::Util->time(),
|
||||
$control->getTrace(),
|
||||
$control->getOrderIndex($control->getTrace()),
|
||||
$functionName,$packageName);
|
||||
$writer->write($record->genoutput());</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>Generates a OperationEntryEvent. This Event should be generated at the start of
|
||||
each monitored function.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_record___kieker__record__operationentryevent__new_timestamp__trace__orderindex__function__package__">$record = Kieker::Record::OperationEntryEvent->new(timestamp, trace, orderIndex, function, package);</a></h2>
|
||||
<p>Creates a new Record. It needs a timestamp, a trace with its corresponding
|
||||
orderIndex, a function name and a package name.</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_string____record__genoutput___">$string = $record-><code>genoutput()</code>;</a></h2>
|
||||
<p>Serializes the record for output. Returns the serialized form of the record.
|
||||
Uses the identifier "1" for the event type.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
92
Umsetzung/Perl/Kieker/Record/OperationExitEvent.pm
Normal file
92
Umsetzung/Perl/Kieker/Record/OperationExitEvent.pm
Normal file
|
@ -0,0 +1,92 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Record::OperationExitEvent;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Record::OperationExitEvent - Kieker Event to be produced at the end
|
||||
of a function call.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $record = Kieker::Record::OperationExitEvent->new(
|
||||
Kieker::Util->time(),
|
||||
$control->getTrace(),
|
||||
$control->getOrderIndex($control->getTrace()),
|
||||
$functionName,$packageName);
|
||||
$writer->write($record->genoutput());
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Generates a OperationExitEvent. This Event should be generated at the end of
|
||||
each monitored function.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $record = Kieker::Record::OperationExitEvent->new(timestamp, trace, orderIndex, function, package);
|
||||
|
||||
Creates a new Record. It needs a timestamp, a trace with its corresponding
|
||||
orderIndex, a function name and a package name.
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my ($type, $timest, $traceID, $orderID, $funName, $packName) = @_;
|
||||
my $this = {
|
||||
timestamp => $timest,
|
||||
traceID => $traceID,
|
||||
orderIndex => $orderID,
|
||||
functionName => $funName,
|
||||
packageName => $packName
|
||||
};
|
||||
|
||||
return bless($this,$type);
|
||||
}
|
||||
|
||||
=head2 $string = $record->genoutput();
|
||||
|
||||
Serializes the record for output. Returns the serialized form of the record.
|
||||
Uses the identifier "2" for the event type.
|
||||
|
||||
=cut
|
||||
|
||||
sub genoutput {
|
||||
my ($self) = @_;
|
||||
return
|
||||
"2;".$self->{timestamp}.";".$self->{traceID}.";".
|
||||
$self->{orderIndex}.";".$self->{functionName}.";".$self->{packageName};
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
104
Umsetzung/Perl/Kieker/Record/OperationExitEvent.pm.htm
Normal file
104
Umsetzung/Perl/Kieker/Record/OperationExitEvent.pm.htm
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Record::OperationExitEvent - Kieker Event to be produced at the end
|
||||
of a function call.</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_record___kieker__record__operationexitevent__new_timestamp__trace__orderindex__function__package__">$record = Kieker::Record::OperationExitEvent->new(timestamp, trace, orderIndex, function, package);</a></li>
|
||||
<li><a href="#_string____record__genoutput___">$string = $record-><code>genoutput()</code>;</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Record::OperationExitEvent - Kieker Event to be produced at the end
|
||||
of a function call.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
my $record = Kieker::Record::OperationExitEvent->new(
|
||||
Kieker::Util->time(),
|
||||
$control->getTrace(),
|
||||
$control->getOrderIndex($control->getTrace()),
|
||||
$functionName,$packageName);
|
||||
$writer->write($record->genoutput());</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>Generates a OperationExitEvent. This Event should be generated at the end of
|
||||
each monitored function.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_record___kieker__record__operationexitevent__new_timestamp__trace__orderindex__function__package__">$record = Kieker::Record::OperationExitEvent->new(timestamp, trace, orderIndex, function, package);</a></h2>
|
||||
<p>Creates a new Record. It needs a timestamp, a trace with its corresponding
|
||||
orderIndex, a function name and a package name.</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_string____record__genoutput___">$string = $record-><code>genoutput()</code>;</a></h2>
|
||||
<p>Serializes the record for output. Returns the serialized form of the record.
|
||||
Uses the identifier "2" for the event type.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
82
Umsetzung/Perl/Kieker/Record/Trace.pm
Normal file
82
Umsetzung/Perl/Kieker/Record/Trace.pm
Normal file
|
@ -0,0 +1,82 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Record::Trace;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Record::Trace - Kieker Event indicating one trace. Gets autocreated by
|
||||
Kieker::Controlling.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $record = Kieker::Record::Trace->new($traceID);
|
||||
|
||||
$writer->write($record->genoutput());
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Generates a Trace. This Event is autocreated by Kieker::Controlling when a new
|
||||
trace is started.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $record = Kieker::Record::Trace->new($traceID);
|
||||
|
||||
Creates a new trace with the given trace ID.
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my ($type, $traceID) = @_;
|
||||
my $this = {
|
||||
traceID => $traceID
|
||||
};
|
||||
|
||||
return bless($this,$type);
|
||||
}
|
||||
|
||||
=head2 $string = $record->genoutput();
|
||||
|
||||
Serializes the record for output. Returns the serialized form of the record.
|
||||
Uses the identifier "3" for the event type.
|
||||
|
||||
=cut
|
||||
|
||||
sub genoutput {
|
||||
my ($self) = @_;
|
||||
return "3;".$self->{traceID}.";0;0;0;0;0";
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
100
Umsetzung/Perl/Kieker/Record/Trace.pm.htm
Normal file
100
Umsetzung/Perl/Kieker/Record/Trace.pm.htm
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Record::Trace - Kieker Event indicating one trace. Gets autocreated by
|
||||
Kieker::Controlling.</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_record___kieker__record__trace__new__traceid__">$record = Kieker::Record::Trace-><code>new($traceID)</code>;</a></li>
|
||||
<li><a href="#_string____record__genoutput___">$string = $record-><code>genoutput()</code>;</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Record::Trace - Kieker Event indicating one trace. Gets autocreated by
|
||||
Kieker::Controlling.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
my $record = Kieker::Record::Trace->new($traceID);
|
||||
|
||||
$writer->write($record->genoutput());</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>Generates a Trace. This Event is autocreated by Kieker::Controlling when a new
|
||||
trace is started.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_record___kieker__record__trace__new__traceid__">$record = Kieker::Record::Trace-><code>new($traceID)</code>;</a></h2>
|
||||
<p>Creates a new trace with the given trace ID.</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_string____record__genoutput___">$string = $record-><code>genoutput()</code>;</a></h2>
|
||||
<p>Serializes the record for output. Returns the serialized form of the record.
|
||||
Uses the identifier "3" for the event type.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
68
Umsetzung/Perl/Kieker/Util.pm
Normal file
68
Umsetzung/Perl/Kieker/Util.pm
Normal file
|
@ -0,0 +1,68 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Util;
|
||||
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Util - Kieker utility functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Kieker::Util;
|
||||
my $time = Kieker::Util->time(); # Get current time in (pseudo)-nanoseconds
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module provides utility functions for other Kieker modules.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $time = Kieker::Util->time();
|
||||
|
||||
Returns current time in pseudo nanoseconds. Perl doesn't provide a real
|
||||
nanosecond timer but only microseconds. Output is formatted to match kieker
|
||||
time format.
|
||||
NO REAL NANOSECONDS, MICROSECOND PRECISION.
|
||||
|
||||
=cut
|
||||
|
||||
sub time {
|
||||
(my $s, my $usec) = gettimeofday();
|
||||
return ($s*1000000+$usec)*1000;
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
93
Umsetzung/Perl/Kieker/Util.pm.htm
Normal file
93
Umsetzung/Perl/Kieker/Util.pm.htm
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Util - Kieker utility functions</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_time___kieker__util__time___">$time = Kieker::Util-><code>time()</code>;</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Util - Kieker utility functions</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
use Kieker::Util;
|
||||
my $time = Kieker::Util->time(); # Get current time in (pseudo)-nanoseconds</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>This module provides utility functions for other Kieker modules.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_time___kieker__util__time___">$time = Kieker::Util-><code>time()</code>;</a></h2>
|
||||
<p>Returns current time in pseudo nanoseconds. Perl doesn't provide a real
|
||||
nanosecond timer but only microseconds. Output is formatted to match kieker
|
||||
time format.
|
||||
NO REAL NANOSECONDS, MICROSECOND PRECISION.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
101
Umsetzung/Perl/Kieker/Writer/FileWriter.pm
Normal file
101
Umsetzung/Perl/Kieker/Writer/FileWriter.pm
Normal file
|
@ -0,0 +1,101 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Writer::FileWriter;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Writer::FileWriter - Provides a Kieker Writer for file output.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Kieker::Writer::FileWriter;
|
||||
my $writer = Kieker::Writer::FileWriter->instance();
|
||||
# Get writer instance
|
||||
|
||||
$writer->write($string); # writes string to the current file
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Writes Kieker records to a Logfile. Can also be used to write other strings to
|
||||
log files.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $writer = Kieker::Writer::FileWriter->instance();
|
||||
|
||||
Returns the writer singleton instance. Thsi object holds the filehandle
|
||||
currently wrinting to. If no instance exists, it is created and a new logfile
|
||||
is created using the current time for the filename.
|
||||
|
||||
=cut
|
||||
|
||||
my $oneTrueSelf;
|
||||
|
||||
sub instance {
|
||||
# check singleton
|
||||
unless (defined $oneTrueSelf) {
|
||||
my ($type) = @_;
|
||||
|
||||
# generate filename from time
|
||||
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
|
||||
my $filename = 'kieker_monitoring_output_'.($year+1900).'-'.sprintf("%02d", ($mon+1)).'-'.$mday.'_'.$hour.':'.$min.':'.$sec.'.log';
|
||||
# open filehandle
|
||||
open(my $filehandle, "> $filename") || die ("can't open output file: $!");
|
||||
|
||||
my $this = {
|
||||
file => $filehandle
|
||||
};
|
||||
$oneTrueSelf = bless $this, $type;
|
||||
}
|
||||
|
||||
return $oneTrueSelf;
|
||||
}
|
||||
|
||||
=head2 $writer->write(STRING);
|
||||
|
||||
Writes STRING to the filehandle.
|
||||
|
||||
=cut
|
||||
|
||||
sub write {
|
||||
my ($self, $string) = @_;
|
||||
my $handle = $self->{file};
|
||||
my $old_fh = select($handle);
|
||||
$| = 1;
|
||||
select($old_fh);
|
||||
print $handle $string;
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
101
Umsetzung/Perl/Kieker/Writer/FileWriter.pm.htm
Normal file
101
Umsetzung/Perl/Kieker/Writer/FileWriter.pm.htm
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Writer::FileWriter - Provides a Kieker Writer for file output.</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_writer___kieker__writer__filewriter__instance___">$writer = Kieker::Writer::FileWriter-><code>instance()</code>;</a></li>
|
||||
<li><a href="#_writer__write_string__">$writer->write(STRING);</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Writer::FileWriter - Provides a Kieker Writer for file output.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
use Kieker::Writer::FileWriter;
|
||||
my $writer = Kieker::Writer::FileWriter->instance();
|
||||
# Get writer instance</pre>
|
||||
<pre>
|
||||
$writer->write($string); # writes string to the current file</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>Writes Kieker records to a Logfile. Can also be used to write other strings to
|
||||
log files.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_writer___kieker__writer__filewriter__instance___">$writer = Kieker::Writer::FileWriter-><code>instance()</code>;</a></h2>
|
||||
<p>Returns the writer singleton instance. Thsi object holds the filehandle
|
||||
currently wrinting to. If no instance exists, it is created and a new logfile
|
||||
is created using the current time for the filename.</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_writer__write_string__">$writer->write(STRING);</a></h2>
|
||||
<p>Writes STRING to the filehandle.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
104
Umsetzung/Perl/Kieker/Writer/JMSWriter.pm
Normal file
104
Umsetzung/Perl/Kieker/Writer/JMSWriter.pm
Normal file
|
@ -0,0 +1,104 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Kieker::Writer::JMSWriter;
|
||||
|
||||
use Net::Stomp;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Kieker::Writer::JMSWriter - Provides a Kieker Writer for JMS output.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Kieker::Writer::JMSWriter;
|
||||
my $writer = Kieker::Writer::JMSWriter->instance();
|
||||
# Get writer instance
|
||||
|
||||
$writer->write($string); # writes string to JMS
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Writes Kieker records to a JMS provider. Can also be used to write other
|
||||
strings.
|
||||
|
||||
=head1 REQUIREMENTS
|
||||
|
||||
Uses Net::Stomp for the JMS connection.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 $writer = Kieker::Writer::JMSWriter->instance();
|
||||
|
||||
Returns the writer singleton instance. Thsi object holds the handle currently
|
||||
wrinting to. If no instance exists, it is created and a connection to the JMS
|
||||
provider is opened. Currently no configuration options are provided and the
|
||||
location of the provider is static in the source. (localhost:61613)
|
||||
|
||||
=cut
|
||||
|
||||
my $singleton;
|
||||
|
||||
sub instance {
|
||||
# check Singleton
|
||||
unless (defined $singleton) {
|
||||
my ($type) = @_;
|
||||
|
||||
my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } );
|
||||
$stomp->connect( { login => 'hello', passcode => 'there' } );
|
||||
|
||||
my $this = {
|
||||
handle => $stomp
|
||||
};
|
||||
$singleton = bless $this, $type;
|
||||
}
|
||||
|
||||
return $singleton;
|
||||
}
|
||||
|
||||
=head2 $writer->write(STRING);
|
||||
|
||||
Writes STRING to JMS.
|
||||
|
||||
=cut
|
||||
|
||||
sub write {
|
||||
my ($self, $msg) = @_;
|
||||
my $handle = $self->{handle};
|
||||
|
||||
$handle->send(
|
||||
{ destination => '/queue/de.cau.cs.se.kieker.service', body => $msg } );
|
||||
}
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.
|
||||
|
||||
=head1 COPYRIGHT and LICENCE
|
||||
|
||||
Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, nbw@informatik.uni-kiel.de
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
108
Umsetzung/Perl/Kieker/Writer/JMSWriter.pm.htm
Normal file
108
Umsetzung/Perl/Kieker/Writer/JMSWriter.pm.htm
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Kieker::Writer::JMSWriter - Provides a Kieker Writer for JMS output.</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rev="made" href="mailto:root@localhost" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: white">
|
||||
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#requirements">REQUIREMENTS</a></li>
|
||||
<li><a href="#methods">METHODS</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#_writer___kieker__writer__jmswriter__instance___">$writer = Kieker::Writer::JMSWriter-><code>instance()</code>;</a></li>
|
||||
<li><a href="#_writer__write_string__">$writer->write(STRING);</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
<p>Kieker::Writer::JMSWriter - Provides a Kieker Writer for JMS output.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||||
<pre>
|
||||
use Kieker::Writer::JMSWriter;
|
||||
my $writer = Kieker::Writer::JMSWriter->instance();
|
||||
# Get writer instance</pre>
|
||||
<pre>
|
||||
$writer->write($string); # writes string to JMS</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>Writes Kieker records to a JMS provider. Can also be used to write other
|
||||
strings.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="requirements">REQUIREMENTS</a></h1>
|
||||
<p>Uses Net::Stomp for the JMS connection.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="methods">METHODS</a></h1>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_writer___kieker__writer__jmswriter__instance___">$writer = Kieker::Writer::JMSWriter-><code>instance()</code>;</a></h2>
|
||||
<p>Returns the writer singleton instance. Thsi object holds the handle currently
|
||||
wrinting to. If no instance exists, it is created and a connection to the JMS
|
||||
provider is opened. Currently no configuration options are provided and the
|
||||
location of the provider is static in the source. (localhost:61613)</p>
|
||||
<p>
|
||||
</p>
|
||||
<h2><a name="_writer__write_string__">$writer->write(STRING);</a></h2>
|
||||
<p>Writes STRING to JMS.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="bugs">BUGS</a></h1>
|
||||
<p>The package is probably full of bugs and is likely to break on every possible
|
||||
occasion. If you find any please let me know via email.</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
|
||||
<p>Copyright 2013 Nis Börge Wechselberg, Kiel, Germany, <a href="mailto:nbw@informatik.uni-kiel.de">nbw@informatik.uni-kiel.de</a></p>
|
||||
<p>The MIT License (MIT)</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue