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