NAME

Bionanny::Data - a container for a Bionnany record


SYNOPSIS

 use Bionanny::Data;
 my $record = new Bionnany::Data (-count => 5,
                                  -name => 'MyFirstservice',
                                  -id => 'http://my.server.org/services/MyFirstService',
                                  -elapsed => 2345);

But more often the instances of Bionanny::Data are created by calling method report of Bionanny::Reporter (which instantiates this class by default):

 use Bionanny::Listener;
 use Bionanny::Report;
 my $bionanny = new Bionanny::Listener;
 # returned elements are of type Bionanny::Data
 my $records = new Bionanny::Report(-data => $bionanny->get)->report;
 # print them
 use Data::Dumper;
 print Data::Dumper->Dump ( [$records], ['Records']);


DESCRIPTION

Each Bionanny::Data object contains one record from a Bionanny service. It can represent a single service invocation, or it can be a cumulated record of many invocations (but always belonging to the same service).

If it is a cumulated record then it contains other Bionanny::Data records as sub-nodes. Maximum is three levels: service -> requests -> records


METHODS

new()

The new() class method constructs a new record container. It can accept the following named arguments (they can start with a dash):

id - a unique (within its level) identifier of this record
count - how many times this event (service, job, reques) occured
name - a display name of this record
from - this record contains requests occured after this time (in ms)
to - this record contains requests occured before this time (in ms)
at - this record was recorded at this time (in ms)
elapsed - how manymiliseconds this invocation took
subnodes - an array reference representing a lower lever of Bionanny::Data objects
metadata - an array reference representing metadata (not yet implemented)


SEE ALSO

http://www.bionanny.org


AUTHOR

Martin Senger (support@bionanny.org)


COPYRIGHT

This file is a component of the Bionanny project. Copyright Michael Niemi & Martin Senger. For details contact support@bionanny.org, or see http://www.bionanny.org/.

Parts were re-factored from modules available in Bioperl project. See copyright notices there.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


DISCLAIMER

This software is provided ``as is'' without warranty of any kind.