Initial commit: add .gitignore and README
This commit is contained in:
59
metrics/collect/collect-developer-metrics.sh
Executable file
59
metrics/collect/collect-developer-metrics.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Load shared libraries
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../../lib/init.sh"
|
||||
|
||||
# Collect developer experience metrics
|
||||
|
||||
set -e
|
||||
|
||||
METRICS_FILE="docs/metrics-data.json"
|
||||
OUTPUT_FILE="docs/metrics-reports/developer-$(date +%Y-%m-%d).json"
|
||||
|
||||
echo "📊 Collecting Developer Experience Metrics..."
|
||||
echo ""
|
||||
|
||||
mkdir -p docs/metrics-reports
|
||||
|
||||
# Initialize metrics object
|
||||
cat > "$OUTPUT_FILE" << 'EOF'
|
||||
{
|
||||
"date": "",
|
||||
"developerExperience": {
|
||||
"onboardingTime": {
|
||||
"baseline": null,
|
||||
"current": null,
|
||||
"reduction": null,
|
||||
"target": 50
|
||||
},
|
||||
"developerSatisfaction": {
|
||||
"current": null,
|
||||
"target": 80,
|
||||
"surveyResponses": null
|
||||
},
|
||||
"documentationCoverage": {
|
||||
"totalProjects": null,
|
||||
"documentedProjects": null,
|
||||
"percentage": 100,
|
||||
"target": 90
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
# Update date
|
||||
if command -v jq &> /dev/null; then
|
||||
jq ".date = \"$(date -Iseconds)\"" "$OUTPUT_FILE" > "$OUTPUT_FILE.tmp"
|
||||
mv "$OUTPUT_FILE.tmp" "$OUTPUT_FILE"
|
||||
fi
|
||||
|
||||
echo "📝 Developer experience metrics template created: $OUTPUT_FILE"
|
||||
echo ""
|
||||
echo "💡 To collect metrics:"
|
||||
echo " 1. Track onboarding times for new developers"
|
||||
echo " 2. Conduct developer satisfaction survey"
|
||||
echo " 3. Audit documentation coverage"
|
||||
echo " 4. Update values in $OUTPUT_FILE"
|
||||
echo " 5. Run: ./scripts/update-metrics.sh developer"
|
||||
|
||||
Reference in New Issue
Block a user