blob: 8c5e2b6b36d0a85d540880ad734041686042cb17 [file] [log] [blame]
#!/bin/bash
set -e
# This is a helper script to be called by androidx.sh
# This script asks parse_profile_html.py to parse the appropriate report html files
cd "$(dirname $0)"
if [ "$OUT_DIR" == "" ]; then
OUT_DIR=../../../../out
fi
if [ "$DIST_DIR" == "" ]; then
DIST_DIR="$OUT_DIR/dist"
fi
METRICS_DIR="$DIST_DIR/librarymetrics/build"
# If a profile file exists, parse it. If not, do nothing
PROFILE_FILES="$OUT_DIR/androidx/build/reports/profile/*.html"
if ls $PROFILE_FILES >/dev/null 2>&1 ; then
./parse_profile_html.py --input-profile "$(ls $PROFILE_FILES | sort | tail -n 2 | head -n 1)" --output-summary $METRICS_DIR/build_androidx.json
fi