Log classifier size

This commit is contained in:
M66B
2023-01-11 10:20:32 +01:00
parent bba4e62b8c
commit f34dd3dfda
2 changed files with 6 additions and 0 deletions

View File

@@ -758,6 +758,11 @@ public class MessageClassifier {
backup ? "classifier.backup" : "classifier.json");
}
static long getSize(Context context) {
File file = getFile(context, false);
return (file.exists() ? file.length() : -1L);
}
private static class State {
private final List<String> words = new ArrayList<>();
private final Map<String, Stat> classStats = new HashMap<>();