diff --git a/tracing-tracy/Cargo.toml b/tracing-tracy/Cargo.toml index c00d5ff..232fbb9 100644 --- a/tracing-tracy/Cargo.toml +++ b/tracing-tracy/Cargo.toml @@ -28,7 +28,7 @@ tokio = { version = "1", features = ["full"] } tracing-attributes = { version = "0.1"} tracing-futures = { version = "0.2" } futures = "0.3" -criterion = "0.3" +criterion = "0.5" [features] # Refer to FEATURES.mkd for documentation on features. diff --git a/tracy-client-sys/Cargo.toml b/tracy-client-sys/Cargo.toml index 4f60ea3..56467a3 100644 --- a/tracy-client-sys/Cargo.toml +++ b/tracy-client-sys/Cargo.toml @@ -23,7 +23,7 @@ required-features = ["fibers"] [dependencies] [build-dependencies] -cc = { version = "1.0.82", default-features = false } +cc = { version = "1.0.83", default-features = false } [features] # Refer to FEATURES.mkd for documentation on features. diff --git a/tracy-client-sys/src/lib.rs b/tracy-client-sys/src/lib.rs index fd04014..7951ab2 100644 --- a/tracy-client-sys/src/lib.rs +++ b/tracy-client-sys/src/lib.rs @@ -27,7 +27,13 @@ //! request rather than statically at the DLL load at the expense of atomic load on each request //! to the profiler data. Corresponds to the `TRACY_DELAYED_INIT` define. #![doc = include_str!("../FEATURES.mkd")] -#![allow(non_snake_case, non_camel_case_types, unused_variables, deref_nullptr)] +#![allow( + non_snake_case, + non_camel_case_types, + non_upper_case_globals, + unused_variables, + deref_nullptr +)] #![cfg_attr(tracy_client_sys_docs, feature(doc_auto_cfg))] #[cfg(feature = "enable")] diff --git a/tracy-client/Cargo.toml b/tracy-client/Cargo.toml index 86dde3c..5d346c9 100644 --- a/tracy-client/Cargo.toml +++ b/tracy-client/Cargo.toml @@ -29,10 +29,10 @@ path = "benches/client.rs" harness = false [dev-dependencies] -criterion = "0.3" +criterion = "0.5" [dependencies] -once_cell = "1.10" +once_cell = "1.19" [dependencies.sys] path = "../tracy-client-sys" @@ -42,7 +42,7 @@ default-features = false features = ["manual-lifetime", "delayed-init"] [target.'cfg(loom)'.dependencies.loom] -version = "0.5" +version = "0.7" [features] # Refer to FEATURES.mkd for documentation on features. diff --git a/tracy-client/benches/client.rs b/tracy-client/benches/client.rs index faddcd3..dc2f808 100644 --- a/tracy-client/benches/client.rs +++ b/tracy-client/benches/client.rs @@ -18,17 +18,17 @@ fn client_running(c: &mut Criterion) { } fn ops_alloc(c: &mut Criterion) { - let client = tracy_client::Client::start(); + let client = Client::start(); c.bench_function("span_alloc_callstack/0", |bencher| { bencher.iter(|| { - client + let _ = client .clone() .span_alloc(Some("hello"), "function", "file", 42, 0); }); }); c.bench_function("span_alloc_callstack/100", |bencher| { bencher.iter(|| { - client + let _ = client .clone() .span_alloc(Some("hello"), "function", "file", 42, 100); }); @@ -39,12 +39,12 @@ fn ops_static(c: &mut Criterion) { let _client = tracy_client::Client::start(); c.bench_function("span_callstack/0", |bencher| { bencher.iter(|| { - tracy_client::span!("some_name", 0); + let _ = tracy_client::span!("some_name", 0); }); }); c.bench_function("span_callstack/100", |bencher| { bencher.iter(|| { - tracy_client::span!("some_name", 100); + let _ = tracy_client::span!("some_name", 100); }); }); } diff --git a/tracy-client/src/frame.rs b/tracy-client/src/frame.rs index a30f737..cda482f 100644 --- a/tracy-client/src/frame.rs +++ b/tracy-client/src/frame.rs @@ -101,7 +101,7 @@ impl Client { /// ``` /// use tracy_client::frame_name; /// # let client = tracy_client::Client::start(); - /// tracy_client::Client::running() + /// let _guard = tracy_client::Client::running() /// .expect("client must be running") /// .non_continuous_frame(frame_name!("a frame")); /// ``` diff --git a/tracy-client/src/lib.rs b/tracy-client/src/lib.rs index 1bafb53..a5dbc39 100644 --- a/tracy-client/src/lib.rs +++ b/tracy-client/src/lib.rs @@ -132,7 +132,8 @@ impl Client { #[cfg(feature = "enable")] unsafe { let stack_depth = adjust_stack_depth(callstack_depth).into(); - let () = sys::___tracy_emit_message(message.as_ptr().cast(), message.len(), stack_depth); + let () = + sys::___tracy_emit_message(message.as_ptr().cast(), message.len(), stack_depth); } } @@ -148,7 +149,12 @@ impl Client { #[cfg(feature = "enable")] unsafe { let depth = adjust_stack_depth(callstack_depth).into(); - let () = sys::___tracy_emit_messageC(message.as_ptr().cast(), message.len(), rgba >> 8, depth); + let () = sys::___tracy_emit_messageC( + message.as_ptr().cast(), + message.len(), + rgba >> 8, + depth, + ); } } } @@ -224,7 +230,8 @@ impl ProfiledAllocator { if self.1 == 0 { let () = sys::___tracy_emit_memory_alloc(ptr.cast(), size, 1); } else { - let () = sys::___tracy_emit_memory_alloc_callstack(ptr.cast(), size, self.1.into(), 1); + let () = + sys::___tracy_emit_memory_alloc_callstack(ptr.cast(), size, self.1.into(), 1); } } } diff --git a/tracy-client/tests/tests.rs b/tracy-client/tests/tests.rs index 2dfb975..08e728a 100644 --- a/tracy-client/tests/tests.rs +++ b/tracy-client/tests/tests.rs @@ -43,8 +43,8 @@ fn finish_secondary_frameset() { fn non_continuous_frameset() { const NON_CONTINUOUS: FrameName = frame_name!("non continuous"); let client = Client::start(); - client.non_continuous_frame(NON_CONTINUOUS); - non_continuous_frame!("non continuous macro"); + let _ = client.non_continuous_frame(NON_CONTINUOUS); + let _ = non_continuous_frame!("non continuous macro"); } fn plot_something() { @@ -98,8 +98,8 @@ fn set_thread_name() { fn nameless_span() { let client = Client::start(); - span!(); - client.span_alloc(None, "nameless_span", file!(), line!(), 0); + let _ = span!(); + let _ = client.span_alloc(None, "nameless_span", file!(), line!(), 0); set_thread_name!("test thread"); }