Skip to content

Instantly share code, notes, and snippets.

@ardakazanci
Created February 10, 2025 15:38
Show Gist options
  • Save ardakazanci/53bd6b26b94c61e0a11f65a877b33d94 to your computer and use it in GitHub Desktop.
Save ardakazanci/53bd6b26b94c61e0a11f65a877b33d94 to your computer and use it in GitHub Desktop.
Daily Measure Build Time
#!/bin/bash
LOG_FILE="build_times.log"
START_TIME=$(date +%s)
echo "Starting Gradle Build..."
./gradlew assembleDebug
END_TIME=$(date +%s)
BUILD_TIME=$((END_TIME - START_TIME))
echo "Build completed in $BUILD_TIME seconds"
echo "$(date '+%Y-%m-%d %H:%M:%S') - Build time: $BUILD_TIME seconds" >> $LOG_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment