fidl_fuchsia_power_observability__common/fidl_fuchsia_power_observability__common.rs
1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// The name of current active epolls, recorded when epolls
12/// become active and if we attempted to suspend, but failed because
13/// there were active epolls.
14pub const ACTIVE_EPOLLS: &str = "active_epolls";
15
16/// The name of current active wake locks, recorded when wake locks
17/// become active and if we attempted to suspend, but failed because
18/// there were active wake locks.
19pub const ACTIVE_WAKE_LOCK_NAMES: &str = "active_wake_lock_names";
20
21/// The delta between the boot and monotonic clocks after resuming from
22/// suspend, in nanoseconds.
23/// Formula: mono_time_ns = boot_time_ns - boot_monotonic_difference_ns
24pub const BOOT_MONO_DIFF: &str = "boot_monotonic_difference_ns";
25
26/// The boot time captured after resuming from suspend, in nanoseconds.
27pub const BOOT_TIME: &str = "boot_time_ns";
28
29/// Label of an inspect node tracking boot vs monotonic timestamps.
30pub const BOOT_TO_MONO_NODE: &str = "boot_to_monotonic_timeline";
31
32/// The name of current inactive epolls, recorded when epolls
33/// become inactive and if we attempted to suspend, but failed
34/// because there were active epolls.
35pub const INACTIVE_EPOLLS: &str = "inactive_epolls";
36
37/// The name of current inactive wake locks, recorded when wake locks
38/// become inactive and if we attempted to suspend, but failed
39/// because there were active wake locks.
40pub const INACTIVE_WAKE_LOCK_NAMES: &str = "inactive_wake_lock_names";
41
42/// Timestamp in nanos, for the end of resume callback processing.
43/// Resume is not gated on phase completion.
44/// Event is recorded in SUSPEND_EVENTS_NODE.
45pub const RESUME_CALLBACK_PHASE_END_AT: &str = "resume_callbacks_ended_at_ns";
46
47/// Timestamp in nanos, for the start of resume callback processing.
48/// Resume is not gated on phase completion.
49/// Event is recorded in SUSPEND_EVENTS_NODE.
50pub const RESUME_CALLBACK_PHASE_START_AT: &str = "resume_callbacks_started_at_ns";
51
52/// Timestamp in nanos at which suspend was attempted.
53pub const SUSPEND_ATTEMPTED_AT: &str = "attempted_at_ns";
54
55/// Timestamp in nanos for when a suspend attempt was blocked internally.
56/// Suspend may be repeatedly blocked until all suspend locks and suspend
57/// blockers have been dropped.
58pub const SUSPEND_ATTEMPT_BLOCKED_AT: &str = "attempt_blocked_at_ns";
59
60/// Timestamp in nanos for when at least one suspend blocker is acquired.
61/// This occurs when an internal procedure needs to prevent suspension.
62/// For example, when servicing a wake lease request, system-activity-governor
63/// will acquire a suspend blocker for the lifetime of the wake lease token.
64/// This prevents suspension even while the underlying power broker lease is
65/// pending.
66pub const SUSPEND_BLOCKER_ACQUIRED_AT: &str = "suspend_blocker_acquired_at_ns";
67
68/// Timestamp in nanos for when the last suspend blocker is dropped.
69pub const SUSPEND_BLOCKER_DROPPED_AT: &str = "suspend_blocker_dropped_at_ns";
70
71/// Timestamp in nanos, for the end of suspend callback processing.
72/// Suspend is gated on phase completion.
73/// Event is recorded in SUSPEND_EVENTS_NODE.
74pub const SUSPEND_CALLBACK_PHASE_END_AT: &str = "suspend_callbacks_ended_at_ns";
75
76/// Timestamp in nanos, for the start of suspend callback processing.
77/// Suspend is gated on phase completion.
78/// Event is recorded in SUSPEND_EVENTS_NODE.
79pub const SUSPEND_CALLBACK_PHASE_START_AT: &str = "suspend_callbacks_started_at_ns";
80
81/// The total cumulative duration of time spent in suspend since boot.
82pub const SUSPEND_CUMULATIVE_DURATION: &str = "total_time_in_suspend_ns";
83
84/// Label of an inspect node tallying suspend events.
85pub const SUSPEND_EVENTS_NODE: &str = "suspend_events";
86
87/// Timestamp in nanos for resume, after an unsuccessful suspend.
88pub const SUSPEND_FAILED_AT: &str = "failed_at_ns";
89
90/// The number of failed suspends.
91pub const SUSPEND_FAIL_COUNT: &str = "fail_count";
92
93/// The duration of time last spent in operations leading to suspend,
94/// excluding the time actually spent suspended.
95///
96/// TODO: b/354239403 - make this string also end with `_ns` to be consistent
97/// with the conventions above.
98pub const SUSPEND_LAST_DURATION: &str = "last_time_in_suspend_operations";
99
100/// The error code related to the last suspend operation.
101pub const SUSPEND_LAST_FAILED_ERROR: &str = "last_failed_error";
102
103/// The duration of time last spent in suspend.
104pub const SUSPEND_LAST_TIMESTAMP: &str = "last_time_in_suspend_ns";
105
106/// Timestamp in nanos for when suspend requests will be blocked because a
107/// suspend lock is acquired. This event occurs right before a request to the
108/// suspend HAL is made.
109pub const SUSPEND_LOCK_ACQUIRED_AT: &str = "suspend_lock_acquired_at_ns";
110
111/// Timestamp in nanos for when a suspend lock is dropped. This event occurs
112/// after a response from the suspend HAL is received and handled by SAG.
113pub const SUSPEND_LOCK_DROPPED_AT: &str = "suspend_lock_dropped_at_ns";
114
115/// The requested future system state.
116pub const SUSPEND_REQUESTED_STATE: &str = "requested_power_state";
117
118/// Timestamp in nanos for resume, after a successful suspend.
119pub const SUSPEND_RESUMED_AT: &str = "resumed_at_ns";
120
121/// Resume reason after a successful suspend.
122pub const SUSPEND_RESUME_REASON: &str = "resume_reason";
123
124/// Label of an inspect node keeping suspend statistics.
125pub const SUSPEND_STATS_NODE: &str = "suspend_stats";
126
127/// The number of successful suspends.
128pub const SUSPEND_SUCCESS_COUNT: &str = "success_count";
129
130/// The current state of wake leases, as tracked by SAG.
131/// The wake lease event history is tracked separately in SUSPEND_EVENTS_NODE.
132pub const WAKE_LEASES_NODE: &str = "wake_leases";
133
134/// Timestamp in nanos for when a wake lease was created.
135pub const WAKE_LEASE_CREATED_AT: &str = "wake_lease_created_at_ns";
136
137/// Timestamp in nanos for a wake lease is dropped.
138pub const WAKE_LEASE_DROPPED_AT: &str = "wake_lease_dropped_at_ns";
139
140/// The kernel object ID of the token vended to the client.
141pub const WAKE_LEASE_ITEM_CLIENT_TOKEN_KOID: &str = "wake_lease_client_token_koid";
142
143/// The error message. For example, if the underlying power broker lease failed
144/// to be satisfied.
145pub const WAKE_LEASE_ITEM_ERROR: &str = "error";
146
147/// The name of the wake lease as requested by the client.
148pub const WAKE_LEASE_ITEM_NAME: &str = "wake_lease_name";
149
150/// The time since boot when the wake lease was created in nanoseconds.
151pub const WAKE_LEASE_ITEM_NODE_CREATED_AT: &str = "wake_lease_created_at";
152
153/// The status of the wake lease.
154pub const WAKE_LEASE_ITEM_STATUS: &str = "wake_lease_status";
155
156/// Lease requested in power broker is awaiting satisfaction in the power
157/// topology.
158pub const WAKE_LEASE_ITEM_STATUS_AWAITING_SATISFACTION: &str = "pending";
159
160/// Lease requested in power broker failed to be satisfied.
161pub const WAKE_LEASE_ITEM_STATUS_FAILED_SATISFACTION: &str = "failed";
162
163/// Lease requested in power broker is satisfied by the current state of the
164/// power topology.
165pub const WAKE_LEASE_ITEM_STATUS_SATISFIED: &str = "satisfied";
166
167/// The type of wake lease.
168pub const WAKE_LEASE_ITEM_TYPE: &str = "wake_lease_type";
169
170/// Lease that blocks the system from dropping below the Application Activity
171/// 'Active' state.
172pub const WAKE_LEASE_ITEM_TYPE_APPLICATION_ACTIVITY: &str = "application_activity";
173
174/// Lease that blocks suspension of the hardware platform.
175pub const WAKE_LEASE_ITEM_TYPE_WAKE: &str = "wake";
176
177/// Timestamp in nanos for when a wake lease failed to be satisfied by power broker.
178pub const WAKE_LEASE_SATISFACTION_FAILED_AT: &str = "wake_lease_satisfaction_failed_at_ns";
179
180/// Timestamp in nanos for when a wake lease is satisfaction with power broker.
181pub const WAKE_LEASE_SATISFIED_AT: &str = "wake_lease_satisfied_at_ns";
182
183/// The key for the timestamp when the wake reason was reported at.
184pub const WAKE_REASONS_REPORTED_AT: &str = "wake_reason_reported_at_ns";
185
186/// A key prefix for a wake reason.
187pub const WAKE_REASONS_WAKE_VECTOR_PREFIX: &str = "wake_reason";
188
189/// The boot timestamp in nanoseconds at which the wake reason report was
190/// generated.
191pub const WAKE_REASON_REPORT_TIME: &str = "wake_reason_last_report_time_ns";
192
193/// The last reported number of potential wake sources for the last successful
194/// wake.
195pub const WAKE_REASON_WAKE_SOURCES_COUNT: &str = "wake_reason_last_wake_sources_count";
196
197/// The last number of UNreported potential wake sources for the last successful
198/// wake.
199pub const WAKE_REASON_WAKE_SOURCES_UNREPORTED_COUNT: &str =
200 "wake_reason_last_wake_sources_unreported_count";
201
202mod internal {
203 use super::*;
204}