mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 12:55:26 +00:00
- Move router-* folders into crates/ directory - Move profiling folder into crates/ - Update Cargo.toml workspace to include new crate locations - Add node_modules/ and package-lock.json to .gitignore - Remove node_modules directory from repository - Create new README.md with project overview and badges - Move old technical documentation to docs/TECHNICAL_PLAN.md This reorganization improves the project structure by: - Consolidating all Rust crates in the crates/ directory - Following standard Rust workspace conventions - Cleaning up root directory clutter - Providing a clear, professional README for new users
32 lines
1.1 KiB
Bash
Executable file
32 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
# Generate flamegraphs for CPU profiling
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
FLAMEGRAPH_DIR="$SCRIPT_DIR/../flamegraphs"
|
|
|
|
mkdir -p "$FLAMEGRAPH_DIR"
|
|
|
|
echo "🔥 Generating flamegraphs..."
|
|
|
|
cd "$PROJECT_ROOT"
|
|
|
|
# Generate flamegraph for distance metrics benchmark
|
|
echo "Flamegraph: distance_metrics..."
|
|
sudo cargo flamegraph --bench distance_metrics --output="$FLAMEGRAPH_DIR/distance_metrics.svg" -- --profile-time=30 || echo "Failed to generate distance_metrics flamegraph"
|
|
|
|
# Generate flamegraph for HNSW search benchmark
|
|
echo "Flamegraph: hnsw_search..."
|
|
sudo cargo flamegraph --bench hnsw_search --output="$FLAMEGRAPH_DIR/hnsw_search.svg" -- --profile-time=30 || echo "Failed to generate hnsw_search flamegraph"
|
|
|
|
# Change ownership
|
|
sudo chown -R $USER:$USER "$FLAMEGRAPH_DIR" 2>/dev/null || true
|
|
|
|
echo "✅ Flamegraph generation complete!"
|
|
echo "Flamegraphs saved to: $FLAMEGRAPH_DIR"
|
|
echo ""
|
|
echo "View flamegraphs:"
|
|
echo " firefox $FLAMEGRAPH_DIR/distance_metrics.svg"
|
|
echo " firefox $FLAMEGRAPH_DIR/hnsw_search.svg"
|