Debug: classifier file size

pull/211/head
M66B 2 years ago
parent ee3475e998
commit 8b65ef6b34

@ -2048,6 +2048,10 @@ public class Log {
.append(TextHelper.canTransliterate()) .append(TextHelper.canTransliterate())
.append("\r\n"); .append("\r\n");
sb.append("Classifier: ")
.append(Helper.humanReadableByteCount(MessageClassifier.getSize(context)))
.append("\r\n");
sb.append("\r\n"); sb.append("\r\n");
int cpus = Runtime.getRuntime().availableProcessors(); int cpus = Runtime.getRuntime().availableProcessors();

@ -759,8 +759,11 @@ public class MessageClassifier {
} }
static long getSize(Context context) { static long getSize(Context context) {
File file = getFile(context, false); try {
return (file.exists() ? file.length() : -1L); return getFile(context, false).length();
} catch (Throwable ignored) {
return -1L;
}
} }
private static class State { private static class State {

Loading…
Cancel
Save