5
5
= SUBTITLE Collect performance state for analysis
6
6
7
7
class Telemetry { }
8
- class Telemetry::Period { }
9
8
10
- B < Note: > This class is a Rakudo-specific feature and not standard Perl 6.
9
+ B < Note: > This class is a Rakudo-specific feature and not standard Perl 6.
11
10
12
11
On creation, a C < Telemetry > object contains a snapshot of the current state
13
12
of the virtual machine. This is in itself useful, but generally one needs
14
- two snapshots for the difference (which is a C < Telemetry::Period > object).
13
+ two snapshots for the difference (which is a
14
+ L < Telemetry::Period|/type/Telemetry::Period > object).
15
15
16
16
The following data is available both as a method on a C < Telemetry > type object,
17
- as well as on an instantiated C < Telemetry > object. When loading it as a
17
+ as well as on an instantiated C < Telemetry > object. When loading it as a
18
18
module with the C < :COLUMNS > named parameter, these are also available as
19
19
standalone subroutines.
20
20
@@ -24,4 +24,138 @@ use Telemetry :COLUMNS; # imports all of the possible columns of report
24
24
use Telemetry < cpu wallclock snap >; # only imports cpu, wallclock and snap
25
25
= end code
26
26
27
+ Apart from this data, other fields in the POSIX C < getrusage > struct are also
28
+ collected, but are probably not in use on most operating systems and will thus
29
+ always give 0. These are (column names in parenthesis):
30
+
31
+ id-rss, inblock (inb), invcw, is-rss, ix-rss, maj-flt (aft), min-flt (ift),
32
+ msgrcv (mrc), msgsnd (msd), nsignals (ngs), nswap (nsw), nvcsw (vcs),
33
+ outblock (oub).
34
+
35
+ Please consult the C < getrusage > manual information for the meaning of these
36
+ fields.
37
+
38
+ = head1 Methods
39
+
40
+ = head2 method affinity-tasks-completed
41
+
42
+ multi method affinity-tasks-completed(Telemetry:U: --> Int)
43
+ multi method affinity-tasks-completed(Telemetry:D: --> Int)
44
+
45
+ Available data. Column name: C < atc > .
46
+
47
+ Returns the number of tasks completed in affinity threads in this period.
48
+
49
+ = head2 method affinity-tasks-queued
50
+
51
+ multi method affinity-tasks-queued(Telemetry:U: --> Int)
52
+ multi method affinity-tasks-queued(Telemetry:D: --> Int)
53
+
54
+ Available data. Column name: C < atq > .
55
+
56
+ Returns the number of tasks queued for execution in affinity threads.
57
+
58
+ = head2 method affinity-workers
59
+
60
+ multi method affinity-workers(Telemetry:U: --> Int)
61
+ multi method affinity-workers(Telemetry:D: --> Int)
62
+
63
+ Available data. Column name: C < aw > .
64
+
65
+ Returns the number of affinity threads added in this period.
66
+
67
+ = head2 method cpu
68
+
69
+ multi method cpu(Telemetry:U: --> Int)
70
+ multi method cpu(Telemetry:D: --> Int)
71
+
72
+ Available data.
73
+
74
+ Returns the total amount of CPU time of this period (in microseconds),
75
+ essentially the sum of C < cpu-user > and C < cpu-sys > .
76
+
77
+ = head2 method cpu-user
78
+
79
+ multi method cpu-user(Telemetry:U: --> Int)
80
+ multi method cpu-user(Telemetry:D: --> Int)
81
+
82
+ Available data.
83
+
84
+ Returns the amount of CPU time spent on executing user code of this period
85
+ (in microseconds).
86
+
87
+ = head2 method cpu-sys
88
+
89
+ multi method cpu-sys(Telemetry:U: --> Int)
90
+ multi method cpu-sys(Telemetry:D: --> Int)
91
+
92
+ Available data.
93
+
94
+ Returns the amount of CPU time spent in system overhead of this period (in
95
+ microseconds).
96
+
97
+ = head2 method general-tasks-completed
98
+
99
+ multi method general-tasks-completed(Telemetry:U: --> Int)
100
+ multi method general-tasks-completed(Telemetry:D: --> Int)
101
+
102
+ Available data. Column name: C < gtc > .
103
+
104
+ Returns the number of tasks completed in general worker threads in this period.
105
+
106
+ = head2 method general-tasks-queued
107
+
108
+ multi method general-tasks-queued(Telemetry:U: --> Int)
109
+ multi method general-tasks-queued(Telemetry:D: --> Int)
110
+
111
+ Available data. Column name: C < gtq > .
112
+
113
+ Returns the number of tasks queued for execution in general worker threads
114
+ in this period.
115
+
116
+ = head2 method general-workers
117
+
118
+ multi method general-workers(Telemetry:U: --> Int)
119
+ multi method general-workers(Telemetry:D: --> Int)
120
+
121
+ Available data. Column name: C < gw > .
122
+
123
+ Returns the number of general worker threads that were added in this period.
124
+
125
+ = head2 method max-rss
126
+
127
+ multi method max-rss(Telemetry:U: --> Int)
128
+ multi method max-rss(Telemetry:D: --> Int)
129
+
130
+ Available data.
131
+
132
+ Returns the maximum resident set size increase for this period (in Kbytes).
133
+
134
+ = head2 method supervisor
135
+
136
+ multi method supervisor(Telemetry:U: --> Int)
137
+ multi method supervisor(Telemetry:D: --> Int)
138
+
139
+ Available data. Column name: C < s > .
140
+
141
+ Returns The number of supervisor threads running, usually C < 0 > or C < 1 > .
142
+
143
+ = head2 method timer-tasks-completed
144
+
145
+ multi method timer-tasks-completed(Telemetry:U: --> Int)
146
+ multi method timer-tasks-completed(Telemetry:D: --> Int)
147
+
148
+ Available data. Column name: C < ttc > .
149
+
150
+ Returns the number of tasks completed in timer worker threads.
151
+
152
+ = head2 method timer-tasks-queued
153
+
154
+ multi method timer-tasks-queued(Telemetry:U: --> Int)
155
+ multi method timer-tasks-queued(Telemetry:D: --> Int)
156
+
157
+ Available data. Column name: C < ttq > .
158
+
159
+ Returns the number of tasks queued for execution in timer worker threads.
160
+
27
161
= end pod
0 commit comments