1 | //! This file contains mocks of the metrics types used in the I/O driver. |
2 | //! |
3 | //! The reason these mocks don't live in `src/runtime/mock.rs` is because |
4 | //! these need to be available in the case when `net` is enabled but |
5 | //! `rt` is not. |
6 | |
7 | cfg_not_rt_and_metrics_and_net! { |
8 | #[derive(Default)] |
9 | pub(crate) struct IoDriverMetrics {} |
10 | |
11 | impl IoDriverMetrics { |
12 | pub(crate) fn incr_fd_count(&self) {} |
13 | pub(crate) fn dec_fd_count(&self) {} |
14 | pub(crate) fn incr_ready_count_by(&self, _amt: u64) {} |
15 | } |
16 | } |
17 | |
18 | cfg_net! { |
19 | cfg_rt! { |
20 | cfg_metrics! { |
21 | pub(crate) use crate::runtime::IoDriverMetrics; |
22 | } |
23 | } |
24 | } |
25 | |