Skip to content

Instantly share code, notes, and snippets.

@ardakazanci
Created February 10, 2025 15:38
Show Gist options
  • Select an option

  • Save ardakazanci/53bd6b26b94c61e0a11f65a877b33d94 to your computer and use it in GitHub Desktop.

Select an option

Save ardakazanci/53bd6b26b94c61e0a11f65a877b33d94 to your computer and use it in GitHub Desktop.

Revisions

  1. ardakazanci created this gist Feb 10, 2025.
    13 changes: 13 additions & 0 deletions MeasureBuildTime.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/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