Added runtime stats to debug info

This commit is contained in:
M66B 2021-08-30 12:06:18 +02:00
parent 8f0d1e3bf4
commit dd5c1d0ba3
1 changed files with 10 additions and 0 deletions

View File

@ -1842,6 +1842,16 @@ public class Log {
sb.append("\r\n"); sb.append("\r\n");
} }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
try {
Map<String, String> stats = Debug.getRuntimeStats();
for (String key : stats.keySet())
sb.append(key).append('=').append(stats.get(key)).append("\r\n");
sb.append("\r\n");
} catch (Throwable ex) {
sb.append(ex.toString()).append("\r\n");
}
sb.append(String.format("Installed: %s\r\n", new Date(Helper.getInstallTime(context)))); sb.append(String.format("Installed: %s\r\n", new Date(Helper.getInstallTime(context))));
sb.append(String.format("Now: %s\r\n", new Date())); sb.append(String.format("Now: %s\r\n", new Date()));