pub struct CaptureRun { /* private fields */ }Expand description
One planned capture from session open through atomic bundle publication.
Implementations§
Source§impl CaptureRun
impl CaptureRun
Sourcepub fn begin(
destination: impl Into<PathBuf>,
run: ProfileRun,
) -> Result<CaptureBegin>
pub fn begin( destination: impl Into<PathBuf>, run: ProfileRun, ) -> Result<CaptureBegin>
Reconcile the destination and, when the planned capture is not yet published, open a staged trace session next to it.
Sourcepub fn session(&self) -> &TraceSession
pub fn session(&self) -> &TraceSession
The live trace session for spans, ops, stats, scalars, and gradients.
Sourcepub fn with_nsight_dir(self, nsight_dir: impl Into<PathBuf>) -> Self
pub fn with_nsight_dir(self, nsight_dir: impl Into<PathBuf>) -> Self
Retain a directory of official Nsight artifacts inside the bundle.
pub fn destination(&self) -> &Path
Sourcepub fn staging_trace(&self) -> &Path
pub fn staging_trace(&self) -> &Path
The staged trace path. It exists until publication succeeds; on failure it is retained for diagnosis.
Sourcepub fn publish(self) -> Result<PublicationReceipt>
pub fn publish(self) -> Result<PublicationReceipt>
Finish the session as complete and atomically publish the bundle.
Sourcepub fn publish_failed(
self,
reason: impl Into<String>,
) -> Result<PublicationReceipt>
pub fn publish_failed( self, reason: impl Into<String>, ) -> Result<PublicationReceipt>
Finish the session as an explicit failed capture and still publish the diagnosable bundle, so crashed campaign steps stay queryable.
Auto Trait Implementations§
impl !Freeze for CaptureRun
impl !RefUnwindSafe for CaptureRun
impl !Sync for CaptureRun
impl Send for CaptureRun
impl Unpin for CaptureRun
impl UnsafeUnpin for CaptureRun
impl UnwindSafe for CaptureRun
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more