Skip to content

Commit 58a98d0

Browse files
authored
remove clock_time_get instrumentation (#4709)
2 parents 9281a01 + 73d7613 commit 58a98d0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/wasix/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ sys-default = [
165165
"ctrlc"
166166
]
167167
sys-poll = []
168+
extra-logging = []
168169
sys-thread = ["tokio/rt", "tokio/time", "tokio/rt-multi-thread", "rusty_pool"]
169170
journal = ["tokio/fs", "wasmer-journal/log-file"]
170171

lib/wasix/src/syscalls/wasi/clock_time_get.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use super::*;
22
use crate::syscalls::*;
33

4+
// NOTE: This syscall is not instrumented since it will be logged too much,
5+
// hence introducing too much noise to the logs.
6+
47
/// ### `clock_time_get()`
58
/// Get the time of the specified clock
69
/// Inputs:
@@ -11,8 +14,10 @@ use crate::syscalls::*;
1114
/// Output:
1215
/// - `Timestamp *time`
1316
/// The value of the clock in nanoseconds
14-
//#[instrument(level = "trace", skip_all, fields(?clock_id, %precision), ret)]
15-
#[instrument(level = "trace", skip_all, ret)]
17+
#[cfg_attr(
18+
feature = "extra-logging",
19+
tracing::instrument(level = "trace", skip_all, ret)
20+
)]
1621
pub fn clock_time_get<M: MemorySize>(
1722
mut ctx: FunctionEnvMut<'_, WasiEnv>,
1823
clock_id: Snapshot0Clockid,

0 commit comments

Comments
 (0)