Skip to content

Commit d30a72e

Browse files
committed
fix(profiler): fix permissions issues with profiler doc test
1 parent 91e842b commit d30a72e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/profiler/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,11 @@ fn setup(path: String, frequency: i32, interval: u64, name: String) -> Result<()
194194
///
195195
/// ```
196196
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
197+
/// let temp_dir = tempfile::Builder::new().prefix("my-service-profile-").tempdir()?;
198+
/// let profile_path = temp_dir.path().to_str().ok_or("Invalid path")?.to_string();
199+
///
197200
/// profiler::setup_profiling(
198-
/// "/opt/profiling/my-service".to_string(),
201+
/// profile_path,
199202
/// 150,
200203
/// 120,
201204
/// Some("My Service".to_string()),

0 commit comments

Comments
 (0)