NAME
Win32::Tracert::Statistics - Permit access to some statistics from determined Win32::Tracert path
VERSION
version 0.011
SYNOPSIS
use Win32::Tracert;
use Win32::Tracert::Statistics;
my $target = "127.0.0.1";
my $route = Win32::Tracert->new(destination => "$target");
my $result;
my $number_of_excluded_values;
if ($route->to_trace->found){
my $statistic=Win32::Tracert::Statistics->new(input => $route->path);
foreach my $packetsmp ($statistic->list_packet_samples){
($result,$number_of_excluded_values)=$statistic->average_responsetime_for("$packetsmp");
print "$packetsmp: Average response time is $result with $number_of_excluded_values value(s) excluded\n";
}
}
Attributes
- *input
-
This attribute is used as argument before creating object. It contain the result of path method from route object. The result must be a hashtable and dereferenced
METHODS
average_responsetime_for
This method take a packet sample name as argument and return a list of two value:
- 1) average responsetime for selected packet sample,
- 2) number of value exluded from calculated average responsetime,
You can get packet samples list with list_packet_samples method.
average_responsetime_global
This method return a list of two value:
- 1) average responsetime from all packet samples,
- 2) average number of exluded values from average responsetime calculated,
list_packet_samples
This method return a list of named packet samples. By default on Win32 system, Tracert send 3 packets at each hop between source to destination.
Each value stored in packet sample named PACKET1_RT, PACKET2_RT, PACKET3_RT in Win32::Tracert::Parser object.
In order to offer, in the future, possibility to specify number of packet to send it is recommended to use this method.
SEE ALSO
* Win32::Tracert * Win32::Tracert::Parser
AUTHOR
Sébastien Deseille <sebastien.deseille@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Sébastien Deseille.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.