Skip to content

Commit

Permalink
Add "profiling" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezyLemon authored and shssoichiro committed Mar 10, 2024
1 parent 31ef767 commit 2ff52d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ repository = "https://github.com/rust-av/v_frame"

[features]
serialize = ["serde", "aligned-vec/serde"]
tracing = [
"profiling/profile-with-tracing",
"dep:tracing"
]
profiling = ["dep:profiling"]
tracing = ["profiling", "dep:tracing", "profiling/profile-with-tracing"]

[dependencies]
cfg-if = "1.0"
num-traits = "0.2"
num-derive = "0.4"
noop_proc_macro = "0.3.0"
serde = { version = "1.0", features = ["derive"], optional = true }
profiling = { version = "1" }
tracing = { version = "0.1.40", optional = true }
aligned-vec = "0.5.0"

# Profiling dependencies
profiling = { version = "1", optional = true }
tracing = { version = "0.1.40", optional = true }

[[bench]]
name = "bench"
harness = false
Expand Down
2 changes: 1 addition & 1 deletion src/plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ impl<T: Pixel> Plane<T> {
/// # Panics
///
/// - If the current plane's width and height are not at least `SCALE` times the `in_plane`'s
#[profiling::function(downscale_in_place)]
#[cfg_attr(feature = "profiling", profiling::function(downscale_in_place))]
pub fn downscale_in_place<const SCALE: usize>(&self, in_plane: &mut Plane<T>) {
let stride = in_plane.cfg.stride;
let width = in_plane.cfg.width;
Expand Down

0 comments on commit 2ff52d0

Please sign in to comment.