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 number of current active epolls, recorded when epolls become
12/// active / inactive and if we attempted to suspend, but failed
13/// because there were active epolls.
14pub const ACTIVE_EPOLLS_COUNT: &str = "active_epolls_count";
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 wake locks, recorded when wake locks
33/// become inactive and if we attempted to suspend, but failed
34/// because there were active wake locks.
35pub const INACTIVE_WAKE_LOCK_NAMES: &str = "inactive_wake_lock_names";
36
37/// Timestamp in nanos, for the end of resume callback processing.
38/// Resume is not gated on phase completion.
39/// Event is recorded in SUSPEND_EVENTS_NODE.
40pub const RESUME_CALLBACK_PHASE_END_AT: &str = "resume_callbacks_ended_at_ns";
41
42/// Timestamp in nanos, for the start 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_START_AT: &str = "resume_callbacks_started_at_ns";
46
47/// Timestamp in nanos at which suspend was attempted.
48pub const SUSPEND_ATTEMPTED_AT: &str = "attempted_at_ns";
49
50/// Timestamp in nanos for when a suspend attempt was blocked internally.
51/// Suspend may be repeatedly blocked until all suspend locks and suspend
52/// blockers have been dropped.
53pub const SUSPEND_ATTEMPT_BLOCKED_AT: &str = "attempt_blocked_at_ns";
54
55/// Timestamp in nanos for when at least one suspend blocker is acquired.
56/// This occurs when an internal procedure needs to prevent suspension.
57/// For example, when servicing a wake lease request, system-activity-governor
58/// will acquire a suspend blocker for the lifetime of the wake lease token.
59/// This prevents suspension even while the underlying power broker lease is
60/// pending.
61pub const SUSPEND_BLOCKER_ACQUIRED_AT: &str = "suspend_blocker_acquired_at_ns";
62
63/// Timestamp in nanos for when the last suspend blocker is dropped.
64pub const SUSPEND_BLOCKER_DROPPED_AT: &str = "suspend_blocker_dropped_at_ns";
65
66/// Timestamp in nanos, for the end of suspend callback processing.
67/// Suspend is gated on phase completion.
68/// Event is recorded in SUSPEND_EVENTS_NODE.
69pub const SUSPEND_CALLBACK_PHASE_END_AT: &str = "suspend_callbacks_ended_at_ns";
70
71/// Timestamp in nanos, for the start of suspend callback processing.
72/// Suspend is gated on phase completion.
73/// Event is recorded in SUSPEND_EVENTS_NODE.
74pub const SUSPEND_CALLBACK_PHASE_START_AT: &str = "suspend_callbacks_started_at_ns";
75
76/// The total cumulative duration of time spent in suspend since boot.
77pub const SUSPEND_CUMULATIVE_DURATION: &str = "total_time_in_suspend_ns";
78
79/// Label of an inspect node tallying suspend events.
80pub const SUSPEND_EVENTS_NODE: &str = "suspend_events";
81
82/// Timestamp in nanos for resume, after an unsuccessful suspend.
83pub const SUSPEND_FAILED_AT: &str = "failed_at_ns";
84
85/// The number of failed suspends.
86pub const SUSPEND_FAIL_COUNT: &str = "fail_count";
87
88/// The duration of time last spent in operations leading to suspend,
89/// excluding the time actually spent suspended.
90///
91/// TODO: b/354239403 - make this string also end with `_ns` to be consistent
92/// with the conventions above.
93pub const SUSPEND_LAST_DURATION: &str = "last_time_in_suspend_operations";
94
95/// The error code related to the last suspend operation.
96pub const SUSPEND_LAST_FAILED_ERROR: &str = "last_failed_error";
97
98/// The duration of time last spent in suspend.
99pub const SUSPEND_LAST_TIMESTAMP: &str = "last_time_in_suspend_ns";
100
101/// Timestamp in nanos for when suspend requests will be blocked because a
102/// suspend lock is acquired. This event occurs right before a request to the
103/// suspend HAL is made.
104pub const SUSPEND_LOCK_ACQUIRED_AT: &str = "suspend_lock_acquired_at_ns";
105
106/// Timestamp in nanos for when a suspend lock is dropped. This event occurs
107/// after a response from the suspend HAL is received and handled by SAG.
108pub const SUSPEND_LOCK_DROPPED_AT: &str = "suspend_lock_dropped_at_ns";
109
110/// The requested future system state.
111pub const SUSPEND_REQUESTED_STATE: &str = "requested_power_state";
112
113/// Timestamp in nanos for resume, after a successful suspend.
114pub const SUSPEND_RESUMED_AT: &str = "resumed_at_ns";
115
116/// Label of an inspect node keeping suspend statistics.
117pub const SUSPEND_STATS_NODE: &str = "suspend_stats";
118
119/// The number of successful suspends.
120pub const SUSPEND_SUCCESS_COUNT: &str = "success_count";
121
122/// The current state of wake leases, as tracked by SAG.
123/// The wake lease event history is tracked separately in SUSPEND_EVENTS_NODE.
124pub const WAKE_LEASES_NODE: &str = "wake_leases";
125
126/// Timestamp in nanos for when a wake lease was created.
127pub const WAKE_LEASE_CREATED_AT: &str = "wake_lease_created_at_ns";
128
129/// Timestamp in nanos for a wake lease is dropped.
130pub const WAKE_LEASE_DROPPED_AT: &str = "wake_lease_dropped_at_ns";
131
132/// The kernel object ID of the token vended to the client.
133pub const WAKE_LEASE_ITEM_CLIENT_TOKEN_KOID: &str = "wake_lease_client_token_koid";
134
135/// The error message. For example, if the underlying power broker lease failed
136/// to be satisfied.
137pub const WAKE_LEASE_ITEM_ERROR: &str = "error";
138
139/// The name of the wake lease as requested by the client.
140pub const WAKE_LEASE_ITEM_NAME: &str = "wake_lease_name";
141
142/// The time since boot when the wake lease was created in nanoseconds.
143pub const WAKE_LEASE_ITEM_NODE_CREATED_AT: &str = "wake_lease_created_at";
144
145/// The status of the wake lease.
146pub const WAKE_LEASE_ITEM_STATUS: &str = "wake_lease_status";
147
148/// Lease requested in power broker is awaiting satisfaction in the power
149/// topology.
150pub const WAKE_LEASE_ITEM_STATUS_AWAITING_SATISFACTION: &str = "pending";
151
152/// Lease requested in power broker failed to be satisfied.
153pub const WAKE_LEASE_ITEM_STATUS_FAILED_SATISFACTION: &str = "failed";
154
155/// Lease requested in power broker is satisfied by the current state of the
156/// power topology.
157pub const WAKE_LEASE_ITEM_STATUS_SATISFIED: &str = "satisfied";
158
159/// The type of wake lease.
160pub const WAKE_LEASE_ITEM_TYPE: &str = "wake_lease_type";
161
162/// Lease that blocks the system from dropping below the Application Activity
163/// 'Active' state.
164pub const WAKE_LEASE_ITEM_TYPE_APPLICATION_ACTIVITY: &str = "application_activity";
165
166/// Lease that blocks suspension of the hardware platform.
167pub const WAKE_LEASE_ITEM_TYPE_WAKE: &str = "wake";
168
169/// Timestamp in nanos for when a wake lease failed to be satisfied by power broker.
170pub const WAKE_LEASE_SATISFACTION_FAILED_AT: &str = "wake_lease_satisfaction_failed_at_ns";
171
172/// Timestamp in nanos for when a wake lease is satisfaction with power broker.
173pub const WAKE_LEASE_SATISFIED_AT: &str = "wake_lease_satisfied_at_ns";
174
175/// The boot timestamp in nanoseconds at which the wake reason report was
176/// generated.
177pub const WAKE_REASON_REPORT_TIME: &str = "wake_reason_last_report_time_ns";
178
179/// The last reported number of potential wake sources for the last successful
180/// wake.
181pub const WAKE_REASON_WAKE_SOURCES_COUNT: &str = "wake_reason_last_wake_sources_count";
182
183/// The last number of UNreported potential wake sources for the last successful
184/// wake.
185pub const WAKE_REASON_WAKE_SOURCES_UNREPORTED_COUNT: &str =
186 "wake_reason_last_wake_sources_unreported_count";
187
188mod internal {
189 use super::*;
190}