Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[tracing::instrument]をすべて消し飛ばす #8

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion onnxruntime/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ impl ModelUrl for AvailableOnnxModel {

impl AvailableOnnxModel {
#[cfg(feature = "model-fetching")]
#[tracing::instrument]
pub(crate) fn download_to<P>(&self, download_dir: P) -> Result<PathBuf>
where
P: AsRef<Path> + std::fmt::Debug,
Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ impl Environment {
*self.env.lock().unwrap().env_ptr.get_mut()
}

#[tracing::instrument]
fn new(name: String, log_level: LoggingLevel) -> Result<Environment> {
// NOTE: Because 'G_ENV' is a lazy_static, locking it will, initially, create
// a new Arc<Mutex<EnvironmentSingleton>> with a strong count of 1.
Expand Down Expand Up @@ -155,7 +154,6 @@ impl Environment {
}

impl Drop for Environment {
#[tracing::instrument]
fn drop(&mut self) {
debug!(
global_arc_count = Arc::strong_count(&G_ENV),
Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub(crate) struct MemoryInfo {
}

impl MemoryInfo {
#[tracing::instrument]
pub fn new(allocator: AllocatorType, memory_type: MemType) -> Result<Self> {
debug!("Creating new memory info.");
let mut memory_info_ptr: *mut sys::OrtMemoryInfo = std::ptr::null_mut();
Expand All @@ -36,7 +35,6 @@ impl MemoryInfo {
}

impl Drop for MemoryInfo {
#[tracing::instrument]
fn drop(&mut self) {
if self.ptr.is_null() {
error!("MemoryInfo pointer is null, not dropping.");
Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pub struct SessionBuilder<'a> {
}

impl<'a> Drop for SessionBuilder<'a> {
#[tracing::instrument]
fn drop(&mut self) {
if self.session_options_ptr.is_null() {
error!("Session options pointer is null, not dropping");
Expand Down Expand Up @@ -485,7 +484,6 @@ pub trait AnyArray: Debug {
}

impl<'a> Drop for Session<'a> {
#[tracing::instrument]
fn drop(&mut self) {
debug!("Dropping the session.");
if self.session_ptr.is_null() {
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/src/tensor/ort_owned_tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ where
D: ndarray::Dimension,
'm: 't, // 'm outlives 't
{
#[tracing::instrument]
fn drop(&mut self) {
debug!("Dropping OrtOwnedTensor.");
unsafe { g_ort().ReleaseValue.unwrap()(self.tensor_ptr) }
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/src/tensor/ort_tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ impl OrtValuePtr {
}

impl Drop for OrtValuePtr {
#[tracing::instrument]
fn drop(&mut self) {
debug!("Dropping Tensor.");
if self.c_ptr.is_null() {
Expand Down