class Telemetry::Period

Performance data over a period

class Telemetry::Period is Telemetry { }

Note: This class is a Rakudo-specific feature and not standard Perl 6.

# basic usage 
use Telemetry;
my $t0 = Telemetry.new;
# execute some code 
my $t1 = Telemetry.new;
my $period = $t1 - $t0;  # creates Telemetry::Period object 
say "Code took $period<wallclock> microseconds to execute";

A Telemetry::Period object contains the difference between two Telemetry objects. It is generally not created by calling .new, but it can be if needed. For all practical purposes, it is the same as the Telemetry object, but the meaning of the values is different (and the values are generally much smaller, as they usually are the difference of two big values of the Telemetry objects from which it was created).