Skip to content

Commit

Permalink
Upgrade deps and fix final clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX authored and nagisa committed Dec 27, 2023
1 parent 4040a1d commit 8165195
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion tracing-tracy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tracy-client-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 7 additions & 1 deletion tracy-client-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
6 changes: 3 additions & 3 deletions tracy-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions tracy-client/benches/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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);
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion tracy-client/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
/// ```
Expand Down
13 changes: 10 additions & 3 deletions tracy-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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,
);
}
}
}
Expand Down Expand Up @@ -224,7 +230,8 @@ impl<T> ProfiledAllocator<T> {
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);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions tracy-client/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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");
}

Expand Down

0 comments on commit 8165195

Please sign in to comment.