pub struct TestFilesystem { /* private fields */ }
Expand description
Filesystem implementation that records clear_cache
calls for validating warm and cold
benchmarks.
Implementations§
Source§impl TestFilesystem
impl TestFilesystem
pub fn new() -> Self
pub async fn clear_cache_count(&self) -> u64
Trait Implementations§
Source§impl CacheClearableFilesystem for TestFilesystem
impl CacheClearableFilesystem for TestFilesystem
Source§fn clear_cache<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_cache<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears all cached data in the filesystem. This method is used in “cold” benchmarks to
ensure that the filesystem isn’t using cached data from the setup phase in the benchmark
phase.
Source§impl Clone for TestFilesystem
impl Clone for TestFilesystem
Source§fn clone(&self) -> TestFilesystem
fn clone(&self) -> TestFilesystem
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Drop for TestFilesystem
impl Drop for TestFilesystem
Source§impl Filesystem for TestFilesystem
impl Filesystem for TestFilesystem
Source§fn shutdown<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
fn shutdown<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
Cleans up the filesystem after a benchmark has run. Filesystem is unusable after this call.
Source§fn benchmark_dir(&self) -> &Path
fn benchmark_dir(&self) -> &Path
Path to where the filesystem is located in the current process’s namespace. All benchmark
operations should happen within this directory.
Auto Trait Implementations§
impl Freeze for TestFilesystem
impl !RefUnwindSafe for TestFilesystem
impl Send for TestFilesystem
impl Sync for TestFilesystem
impl Unpin for TestFilesystem
impl !UnwindSafe for TestFilesystem
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
Source§impl<T> BoxedFilesystem for Twhere
T: Filesystem,
impl<T> BoxedFilesystem for Twhere
T: Filesystem,
Source§fn shutdown_boxed<'a>(
self: Box<T>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>where
T: 'a,
fn shutdown_boxed<'a>(
self: Box<T>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>where
T: 'a,
Filesystem::shutdown
takes the filesystem by value which doesn’t work for Box<&dyn Filesystem>
because the filesystem type isn’t known at compile time. Taking the filesystem
as Box<Self>
works and the type of the filesystem is now known so the
Filesystem::shutdown
method can be called.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)