Initial commit: add .gitignore and README
This commit is contained in:
65
metrics/update-metrics.sh
Executable file
65
metrics/update-metrics.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Load shared libraries
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../lib/init.sh"
|
||||
|
||||
# Update metrics in main data file
|
||||
|
||||
set -e
|
||||
|
||||
CATEGORY="${1:-all}"
|
||||
METRICS_FILE="docs/metrics-data.json"
|
||||
REPORTS_DIR="docs/metrics-reports"
|
||||
|
||||
if [ "$CATEGORY" == "all" ]; then
|
||||
echo "📊 Updating all metrics..."
|
||||
|
||||
# Collect all metrics
|
||||
./scripts/collect-infrastructure-metrics.sh
|
||||
./scripts/collect-code-metrics.sh
|
||||
./scripts/collect-deployment-metrics.sh
|
||||
./scripts/collect-developer-metrics.sh
|
||||
./scripts/collect-operational-metrics.sh
|
||||
./scripts/collect-service-metrics.sh
|
||||
|
||||
echo ""
|
||||
echo "✅ All metrics collected!"
|
||||
echo " → Review reports in $REPORTS_DIR"
|
||||
echo " → Update $METRICS_FILE with current values"
|
||||
else
|
||||
echo "📊 Updating $CATEGORY metrics..."
|
||||
|
||||
case "$CATEGORY" in
|
||||
infrastructure)
|
||||
./scripts/collect-infrastructure-metrics.sh
|
||||
;;
|
||||
code)
|
||||
./scripts/collect-code-metrics.sh
|
||||
;;
|
||||
deployment)
|
||||
./scripts/collect-deployment-metrics.sh
|
||||
;;
|
||||
developer)
|
||||
./scripts/collect-developer-metrics.sh
|
||||
;;
|
||||
operational)
|
||||
./scripts/collect-operational-metrics.sh
|
||||
;;
|
||||
services)
|
||||
./scripts/collect-service-metrics.sh
|
||||
;;
|
||||
*)
|
||||
echo "❌ Unknown category: $CATEGORY"
|
||||
echo " Valid categories: infrastructure, code, deployment, developer, operational, services"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "💡 Next steps:"
|
||||
echo " 1. Review generated reports in $REPORTS_DIR"
|
||||
echo " 2. Update $METRICS_FILE with actual values"
|
||||
echo " 3. Run: ./scripts/generate-metrics-report.sh"
|
||||
|
||||
Reference in New Issue
Block a user