Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Consolidate perf testing and remove unused deps
Maximilian Roos1530d58e09fc
diff --git a/benches/list.rs b/benches/list.rsindex a60917099..5877551c7 100644--- a/benches/list.rs+++ b/benches/list.rs@@ -130,7 +130,7 @@ fn bench_skeleton(c: &mut Criterion) {for cold in [false, true] {let config = BenchConfig::typical(worktrees, cold);let temp = create_repo(&config.repo);- let repo_path = temp.path().join("main");+ let repo_path = temp.path().join("repo");setup_fake_remote(&repo_path);group.bench_with_input(@@ -161,7 +161,7 @@ fn bench_complete(c: &mut Criterion) {for cold in [false, true] {let config = BenchConfig::typical(worktrees, cold);let temp = create_repo(&config.repo);- let repo_path = temp.path().join("main");+ let repo_path = temp.path().join("repo");setup_fake_remote(&repo_path);group.bench_with_input(@@ -185,7 +185,7 @@ fn bench_worktree_scaling(c: &mut Criterion) {for cold in [false, true] {let config = BenchConfig::typical(worktrees, cold);let temp = create_repo(&config.repo);- let repo_path = temp.path().join("main");+ let repo_path = temp.path().join("repo");run_git(&repo_path, &["status"]);group.bench_with_input(@@ -215,7 +215,7 @@ fn bench_real_repo(c: &mut Criterion) {|b, &(worktrees, cold)| {let rust_repo = ensure_rust_repo();let temp = tempfile::tempdir().unwrap();- let workspace_main = temp.path().join("main");+ let workspace_main = temp.path().join("repo");let clone_output = Command::new("git").args([@@ -314,7 +314,7 @@ fn bench_many_branches(c: &mut Criterion) {for cold in [false, true] {let config = BenchConfig::branches(100, 2, cold);let temp = create_repo(&config.repo);- let repo_path = temp.path().join("main");+ let repo_path = temp.path().join("repo");run_git(&repo_path, &["status"]);group.bench_function(config.label(), |b| {@@ -342,7 +342,7 @@ fn bench_divergent_branches(c: &mut Criterion) {for cold in [false, true] {let config = BenchConfig::many_divergent_branches(cold);let temp = create_repo(&config.repo);- let repo_path = temp.path().join("main");+ let repo_path = temp.path().join("repo");run_git(&repo_path, &["status"]);group.bench_function(config.label(), |b| {@@ -364,7 +364,7 @@ fn bench_divergent_branches(c: &mut Criterion) {/// Returns the workspace path (temp dir must outlive usage).fn setup_rust_workspace_with_branches(temp: &tempfile::TempDir, num_branches: usize) -> PathBuf {let rust_repo = ensure_rust_repo();- let workspace_main = temp.path().join("main");+ let workspace_main = temp.path().join("repo");// Clone rust repo locallylet clone_output = Command::new("git")diff --git a/tests/helpers/wt-perf/src/lib.rs b/tests/helpers/wt-perf/src/lib.rsindex 271ced875..f6f12ab18 100644--- a/tests/helpers/wt-perf/src/lib.rs+++ b/tests/helpers/wt-perf/src/lib.rs@@ -218,10 +218,12 @@ pub fn create_repo_at(config: &RepoConfig, base_path: &Path) {run_git(&repo_path, &["checkout", "main"]);}- // Add worktrees+ // Add worktrees (siblings with .branch suffix, worktrunk convention)+ let repo_name = base_path.file_name().unwrap().to_str().unwrap();+ let parent_dir = base_path.parent().unwrap();for wt_num in 1..config.worktrees {let branch = format!("feature-wt-{wt_num}");- let wt_path = base_path.join(format!("wt-{wt_num}"));+ let wt_path = parent_dir.join(format!("{repo_name}.{branch}"));let head_output = Command::new("git").args(["rev-parse", "HEAD"])diff --git a/tests/helpers/wt-perf/src/main.rs b/tests/helpers/wt-perf/src/main.rsindex da54fad91..9e95de035 100644--- a/tests/helpers/wt-perf/src/main.rs+++ b/tests/helpers/wt-perf/src/main.rs@@ -108,21 +108,25 @@ fn main() {canonicalize(&temp).unwrap()};+ // Create repo at base_path (main worktree location)+ // Worktrees will be siblings: base_path.feature-wt-Neprintln!("Creating {} repo...", config);create_repo_at(&repo_config, &base_path);- let repo_path = base_path.join("main");+ let repo_name = base_path.file_name().unwrap().to_str().unwrap();+ let parent_dir = base_path.parent().unwrap();eprintln!();eprintln!("✅ Repository created");eprintln!();- eprintln!("Main worktree: {}", repo_path.display());+ eprintln!("Main worktree: {}", base_path.display());if repo_config.worktrees > 1 {eprintln!("Worktrees: {} total", repo_config.worktrees);for i in 1..repo_config.worktrees {+ let branch = format!("feature-wt-{i}");eprintln!(- " - wt-{}: {}",- i,- base_path.join(format!("wt-{i}")).display()+ " - {}: {}",+ branch,+ parent_dir.join(format!("{repo_name}.{branch}")).display());}}@@ -133,11 +137,11 @@ fn main() {eprintln!("To run with tracing:");eprintln!(" RUST_LOG=debug wt -C {} list 2>&1 | grep wt-trace | wt-perf trace > trace.json",- repo_path.display()+ base_path.display());eprintln!();eprintln!("To invalidate caches (cold run):");- eprintln!(" wt-perf invalidate {}", repo_path.display());+ eprintln!(" wt-perf invalidate {}", base_path.display());if !persist {eprintln!();