Skip to content

Commit 00bf623

Browse files
committed
impl(design): only-real-filenames
1 parent 1cbec78 commit 00bf623

File tree

6 files changed

+461
-149
lines changed

6 files changed

+461
-149
lines changed

codetracer-python-recorder/Cargo.lock

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codetracer-python-recorder/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ env_logger = "0.11"
2525

2626
[dev-dependencies]
2727
pyo3 = { version = "0.25.1", features = ["auto-initialize"] }
28+
tempfile = "3.10"

codetracer-python-recorder/src/lib.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
//! Runtime tracing module backed by PyO3.
2+
//!
3+
//! Tracer implementations must return `CallbackResult` from every callback so they can
4+
//! signal when CPython should disable further monitoring for a location by propagating
5+
//! the `sys.monitoring.DISABLE` sentinel.
6+
17
use std::fs;
2-
use std::path::{Path, PathBuf};
8+
use std::path::Path;
39
use std::sync::atomic::{AtomicBool, Ordering};
410
use std::sync::Once;
511

612
use pyo3::exceptions::PyRuntimeError;
713
use pyo3::prelude::*;
8-
use std::fmt;
9-
1014
pub mod code_object;
1115
mod runtime_tracer;
1216
pub mod tracer;
1317
pub use crate::code_object::{CodeObjectRegistry, CodeObjectWrapper};
14-
pub use crate::tracer::{install_tracer, uninstall_tracer, EventSet, Tracer};
18+
pub use crate::tracer::{
19+
install_tracer, uninstall_tracer, CallbackOutcome, CallbackResult, EventSet, Tracer,
20+
};
1521

1622
/// Global flag tracking whether tracing is active.
1723
static ACTIVE: AtomicBool = AtomicBool::new(false);

0 commit comments

Comments
 (0)