#[cfg(feature = "web")]
mod browser;
mod calibrate;
#[cfg(feature = "mac")]
mod chrome;
mod frame;
mod gpu;
mod io_acc;
mod macros;
mod mem;
mod metrics_acc;
#[cfg(not(target_arch = "wasm32"))]
mod record;
mod scope;
mod sink;
mod system;
#[cfg(feature = "viz")]
pub mod viz;
pub use vor_macros::{all_functions, profile, skip};
#[doc(hidden)]
pub use puffin as __priv_puffin;
#[doc(hidden)]
pub use tracing as __priv_tracing;
#[cfg(feature = "cuda")]
#[doc(hidden)]
#[must_use = "bind the guard so the NVTX range stays open for the scope"]
pub struct __NvtxRange {
_guard: nvtx::RangeGuard,
}
#[cfg(feature = "cuda")]
#[doc(hidden)]
pub fn __nvtx_range(name: &str) -> __NvtxRange {
__NvtxRange {
_guard: nvtx::range!("{name}"),
}
}
#[cfg(not(feature = "cuda"))]
#[doc(hidden)]
pub struct __NvtxRange;
#[cfg(not(feature = "cuda"))]
#[doc(hidden)]
pub const fn __nvtx_range(_name: &str) -> __NvtxRange {
__NvtxRange
}
#[cfg(feature = "web")]
pub use crate::browser::BrowserSink;
pub use crate::calibrate::{calibrate, empty_span_ns};
#[cfg(feature = "mac")]
pub use crate::chrome::ChromeTraceSink;
pub use crate::frame::FrameStats;
pub use crate::io_acc::{IoTick, drain as drain_io, record as record_io};
pub use crate::mem::current_memory_bytes;
pub use crate::metrics_acc::{record_metric, record_metric_unit};
#[cfg(not(target_arch = "wasm32"))]
pub use crate::record::read::{Frame, MetricColumn, Reader};
pub use crate::scope::{ScopeGuard, scope};
pub use crate::sink::{Guard, Sink};
pub use crate::system::SystemSample;
pub fn enable() {
puffin::set_scopes_on(true);
#[cfg(not(target_arch = "wasm32"))]
crate::record::arm();
}
#[cfg(not(target_arch = "wasm32"))]
pub fn flush_recording() {
crate::record::flush();
}
pub fn frame_mark() {
puffin::GlobalProfiler::lock().new_frame();
#[cfg(not(target_arch = "wasm32"))]
crate::record::on_frame_mark();
}