Update migration template with comprehensive time tracking system (15 minutes)
Time Tracking Integration: Add mandatory timing steps and performance analysis Performance Targets: Include realistic complexity-based duration estimates Quality Gates: Require time data in commits and performance comparison Project Estimates: Update to 2-3 weeks based on actual performance data Time: 15 minutes | Complexity: Simple | Issues: None Testing: Manual | Validation: Template review complete
This commit is contained in:
59
scripts/daily-migration-summary.sh
Executable file
59
scripts/daily-migration-summary.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TimeSafari Daily Migration Summary
|
||||
# Usage: ./daily-migration-summary.sh
|
||||
|
||||
LOG_FILE="migration-times.log"
|
||||
TODAY=$(date +"%Y-%m-%d")
|
||||
|
||||
echo "📊 Daily Migration Summary - $TODAY"
|
||||
echo "=================================="
|
||||
|
||||
if [ ! -f "$LOG_FILE" ]; then
|
||||
echo "❌ No migration log found. Start tracking with ./time-migration.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Count components completed today
|
||||
COMPLETED_TODAY=$(grep "^.*,$TODAY" "$LOG_FILE" | grep -v ",,,," | wc -l)
|
||||
TOTAL_TIME=$(grep "^.*,$TODAY" "$LOG_FILE" | grep -v ",,,," | cut -d',' -f4 | awk '{sum+=$1} END {print sum}')
|
||||
|
||||
if [ "$COMPLETED_TODAY" -eq 0 ]; then
|
||||
echo "No components completed today"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Calculate average time
|
||||
AVG_TIME=$(echo "scale=1; $TOTAL_TIME / $COMPLETED_TODAY" | bc -l)
|
||||
|
||||
echo "Components completed today: $COMPLETED_TODAY"
|
||||
echo "Total time spent: $TOTAL_TIME minutes"
|
||||
echo "Average time per component: $AVG_TIME minutes"
|
||||
echo
|
||||
|
||||
# Show today's completions
|
||||
echo "Today's Completions:"
|
||||
echo "==================="
|
||||
grep "^.*,$TODAY" "$LOG_FILE" | grep -v ",,,," | while IFS=',' read -r component start end duration complexity issues commit; do
|
||||
echo "✅ $component ($duration minutes) - $commit"
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
# Show overall progress
|
||||
TOTAL_COMPLETED=$(grep -v "Component,Start Time" "$LOG_FILE" | grep -v ",,,," | wc -l)
|
||||
REMAINING=$((92 - TOTAL_COMPLETED))
|
||||
|
||||
echo "Overall Progress:"
|
||||
echo "=================="
|
||||
echo "Total components: 92"
|
||||
echo "Completed: $TOTAL_COMPLETED"
|
||||
echo "Remaining: $REMAINING"
|
||||
echo "Progress: $(echo "scale=1; $TOTAL_COMPLETED * 100 / 92" | bc -l)%"
|
||||
|
||||
# Estimate completion time
|
||||
if [ "$TOTAL_COMPLETED" -gt 0 ]; then
|
||||
OVERALL_AVG=$(grep -v "Component,Start Time" "$LOG_FILE" | grep -v ",,,," | cut -d',' -f4 | awk '{sum+=$1} END {print sum/'$TOTAL_COMPLETED'}')
|
||||
ESTIMATED_HOURS=$(echo "scale=1; $REMAINING * $OVERALL_AVG / 60" | bc -l)
|
||||
echo "Estimated remaining time: $ESTIMATED_HOURS hours"
|
||||
fi
|
||||
59
scripts/time-migration.sh
Executable file
59
scripts/time-migration.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TimeSafari Migration Time Tracker
|
||||
# Usage: ./time-migration.sh ComponentName.vue
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 ComponentName.vue"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMPONENT=$1
|
||||
TIMESTAMP=$(date +"%Y-%m-%d %H:%M")
|
||||
LOG_FILE="migration-times.log"
|
||||
|
||||
# Create log file header if it doesn't exist
|
||||
if [ ! -f "$LOG_FILE" ]; then
|
||||
echo "Component,Start Time,End Time,Duration (minutes),Complexity,Issues,Commit" > "$LOG_FILE"
|
||||
fi
|
||||
|
||||
# Check if this is start or end
|
||||
if [ "$2" = "start" ]; then
|
||||
echo "⏱️ Starting migration: $COMPONENT at $TIMESTAMP"
|
||||
echo "$COMPONENT,$TIMESTAMP,,,,,," >> "$LOG_FILE"
|
||||
echo "Run: ./time-migration.sh $COMPONENT end"
|
||||
elif [ "$2" = "end" ]; then
|
||||
# Calculate duration and update log
|
||||
START_TIME=$(grep "^$COMPONENT," "$LOG_FILE" | tail -1 | cut -d',' -f2)
|
||||
if [ -z "$START_TIME" ]; then
|
||||
echo "❌ No start time found for $COMPONENT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Calculate duration in minutes
|
||||
START_EPOCH=$(date -d "$START_TIME" +%s)
|
||||
END_EPOCH=$(date +%s)
|
||||
DURATION=$(( (END_EPOCH - START_EPOCH) / 60 ))
|
||||
|
||||
# Get latest commit hash
|
||||
COMMIT=$(git log --oneline -1 | cut -d' ' -f1)
|
||||
|
||||
echo "⏱️ Completed migration: $COMPONENT"
|
||||
echo " Duration: $DURATION minutes"
|
||||
echo " Commit: $COMMIT"
|
||||
|
||||
# Update log file
|
||||
sed -i "s/^$COMPONENT,$START_TIME,,,,,,$/$COMPONENT,$START_TIME,$TIMESTAMP,$DURATION,TBD,None,$COMMIT/" "$LOG_FILE"
|
||||
|
||||
# Show summary
|
||||
echo "📊 Migration Summary:"
|
||||
echo " Component: $COMPONENT"
|
||||
echo " Start: $START_TIME"
|
||||
echo " End: $TIMESTAMP"
|
||||
echo " Duration: $DURATION minutes"
|
||||
echo " Commit: $COMMIT"
|
||||
else
|
||||
echo "Usage: $0 ComponentName.vue [start|end]"
|
||||
echo "Example: $0 MyComponent.vue start"
|
||||
echo " $0 MyComponent.vue end"
|
||||
fi
|
||||
Reference in New Issue
Block a user