#!/bin/sh # Copies the Android client's --perf-log files (native_render/perf_log.h) to ./perf-logs and prints a # summary of the newest one. The phone must be connected with USB debugging; the files can also be # taken off the phone without a PC from Android/data/org.metin2port.client/files/perf. set -e PKG=org.metin2port.client OUT=${1:-perf-logs} mkdir -p "$OUT" adb pull "/sdcard/Android/data/$PKG/files/perf/." "$OUT" newest=$(ls -t "$OUT"/perf-*.csv 2>/dev/null | head -1) [ -n "$newest" ] && python3 "$(dirname "$0")/perf_summary.py" "$newest"