fxfs_trace/
lib.rs

1// Copyright 2023 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5pub use fxfs_trace_macros::*;
6pub use storage_trace::{self, TraceFutureExt};
7
8#[doc(hidden)]
9pub mod __reexport {
10    pub use cstringify::cstringify;
11}
12
13#[macro_export]
14macro_rules! duration {
15    ($name:expr $(, $key:expr => $val:expr)*) => {
16        $crate::storage_trace::duration!(c"fxfs", $name $(,$key => $val)*);
17    }
18}
19
20#[macro_export]
21macro_rules! flow_begin {
22    ($name:expr, $flow_id:expr $(, $key:expr => $val:expr)*) => {
23        $crate::storage_trace::flow_begin!(c"fxfs", $name, $flow_id $(,$key => $val)*);
24    }
25}
26
27#[macro_export]
28macro_rules! flow_step {
29    ($name:expr, $flow_id:expr $(, $key:expr => $val:expr)*) => {
30        $crate::storage_trace::flow_step!(c"fxfs", $name, $flow_id $(,$key => $val)*);
31    }
32}
33
34#[macro_export]
35macro_rules! flow_end {
36    ($name:expr, $flow_id:expr $(, $key:expr => $val:expr)*) => {
37        $crate::storage_trace::flow_end!(c"fxfs", $name, $flow_id $(,$key => $val)*);
38    }
39}
40
41#[macro_export]
42macro_rules! trace_future_args {
43    ($name:expr $(, $key:expr => $val:expr)*) => {
44        $crate::storage_trace::trace_future_args!(c"fxfs", $name $(,$key => $val)*);
45    };
46}