Navigation Menu

Skip to content

Commit

Permalink
Doc Type/Telemetry::Period
Browse files Browse the repository at this point in the history
it causes build failure.
  • Loading branch information
tisonkun committed Nov 5, 2017
1 parent a0ae19f commit dc61e11
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions doc/Type/Telemetry/Period.pod6
@@ -0,0 +1,118 @@
=begin pod
=TITLE class Telemetry::Period
=SUBTITLE Performance data over a period
class Telemetry::Period { }
A C<Telemetry::Period> object contains the difference between two C<Telemetry>
objects. It is generally not created by calling .new, but it can be if needed:
it takes "cpu-user", "cpu-sys" and "wallclock" as named parameters.
=begin code
# 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 (cpu / wallclock) microseconds to execute";
=end code
=head2 Data Methods
=item method affinity-tasks-completed
The number of tasks completed in affinity threads in this period.
=item method affinity-tasks-queued
The number of tasks queued for execution in affinity threads in this period.
=item method affinity-workers
The number of affinity threads added in this period.
=item method cpu
Returns the total amount of CPU time of this period (in microseconds),
essentially the sum of C<cpu-user> and C<cpu-sys>.
=item method cpus
Returns the number of CPUs that were in full use on average in this period
(basically L<cpu> divided by L<wallclock>).
=item method cpu-user
Returns the amount of CPU time spent on executing user code of this period
(in microseconds).
=item method cpu-sys
Returns the amount of CPU time spent in system overhead of this period (in
microseconds).
=item method general-tasks-completed
The number of tasks completed in general worker threads in this period.
=item method general-tasks-queued
The number of tasks queued for execution in general worker threads in this period.
=item method general-workers
The number of general worker threads that were added in this period.
=item method max-rss
Maximum resident set size increase for this period (in Kbytes).
=item method supervisor
The number of supervisor threads added in this period.
=item method timer-tasks-completed
The number of tasks completed in timer worker threads in this period.
=item method timer-tasks-queued
The number of tasks queued for execution in timer worker threads in this period.
=item method timer-workers
The number of timer worker threads that were added in this period.
=item method utilization
Returns the % of CPUs that were used on average in this period.
=item method wallclock
Returns the length of the period (in microseconds).
Apart from these data methods, other fields in the POSIX C<getrusage> struct
are also available, but are probably not in use on most operating systems and
will thus always give 0. These are:
id-rss, inblock, invcw, is-rss, ix-rss, maj-flt, min-flt, msgrcv, msgsnd,
nsignals, nswap, nvcsw, outblock.
Please consult the C<getrusage> manual information for the meaning of these
fields.
=head1 Other methods
=head2 method gist / method Str
Returns a string representation in the form "cpu / wallclock".
=head1 See Also
L<Telemetry>
L<snapper>
=end pod

0 comments on commit dc61e11

Please sign in to comment.