Skip to content

Commit 548e9bd

Browse files
committed
perf(cargo): remove dhat dependency
Refs #294
1 parent d71b7ad commit 548e9bd

5 files changed

Lines changed: 2 additions & 59 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ target/
1313
npm/packages
1414

1515
# Benchmarks
16-
dhat-heap.json
1716
flamegraph.svg

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ clap = { version = "4.5.42", features = ["cargo"] }
1717
color-print = "0.3.7"
1818
colored = "3.0.0"
1919
ctor = "0.4.3"
20-
dhat = { version = "0.3", optional = true }
2120
env_logger = "0.11.8"
2221
glob = "0.3.2"
2322
globset = "0.4.16"
@@ -40,7 +39,6 @@ tokio = { version = "1", features = ["full"] }
4039

4140
[features]
4241
default = []
43-
dhat-heap = ["dhat"]
4442

4543
[profile.release]
4644
codegen-units = 1 # Reduce number of codegen units to increase optimizations

justfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ flamegraph:
107107
cd fixtures/fluid-framework
108108
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -- list
109109

110-
dhat:
111-
#!/usr/bin/env bash
112-
set -euxo pipefail
113-
114-
just build-profile-release
115-
cd fixtures/fluid-framework
116-
cargo run --release --features dhat-heap -- lint
117-
echo "Memory profile saved to dhat-heap.json - view at https://nnethercote.github.io/dh_view/dh_view.html"
118-
119110
# ==============================================================================
120111
# Test
121112
# ==============================================================================

src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ use {
1414
visit_packages::visit_packages,
1515
};
1616

17-
#[cfg(feature = "dhat-heap")]
18-
#[global_allocator]
19-
static ALLOC: dhat::Alloc = dhat::Alloc;
20-
2117
#[cfg(test)]
2218
#[path = "test/test.rs"]
2319
mod test;
@@ -44,9 +40,6 @@ mod visit_packages;
4440

4541
#[tokio::main]
4642
async fn main() {
47-
#[cfg(feature = "dhat-heap")]
48-
let _profiler = dhat::Profiler::new_heap();
49-
5043
let cli = Cli::parse();
5144

5245
logger::init(&cli);
@@ -107,8 +100,5 @@ async fn main() {
107100
}
108101
};
109102

110-
#[cfg(feature = "dhat-heap")]
111-
drop(_profiler);
112-
113103
exit(_exit_code);
114104
}

0 commit comments

Comments
 (0)