Win32::Tracert::Statistics - Permit access to some statistics from determined Win32::Tracert path
version 0.011
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"; } }
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
This method take a packet sample name as argument and return a list of two value:
You can get packet samples list with list_packet_samples method.
This method return a list of two value:
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.
* Win32::Tracert * Win32::Tracert::Parser
Sébastien Deseille <sebastien.deseille@gmail.com>
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.
To install Win32::Tracert, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::Tracert
CPAN shell
perl -MCPAN -e shell install Win32::Tracert
For more information on module installation, please visit the detailed CPAN module installation guide.