mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Print compilation statistics
This commit is contained in:
parent
c82ed6746a
commit
fecc087993
|
@ -459,6 +459,8 @@ public class TeaVMTool implements BaseTeaVMTool {
|
||||||
fileTable.flush();
|
fileTable.flush();
|
||||||
log.info("Cache updated");
|
log.info("Cache updated");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printStats();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new TeaVMToolException("IO error occurred", e);
|
throw new TeaVMToolException("IO error occurred", e);
|
||||||
}
|
}
|
||||||
|
@ -515,6 +517,18 @@ public class TeaVMTool implements BaseTeaVMTool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void printStats() {
|
||||||
|
int classCount = vm.getWrittenClasses().getClassNames().size();
|
||||||
|
int methodCount = 0;
|
||||||
|
for (String className : vm.getWrittenClasses().getClassNames()) {
|
||||||
|
ClassReader cls = vm.getWrittenClasses().get(className);
|
||||||
|
methodCount += cls.getMethods().size();
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("Classes compiled: " + classCount);
|
||||||
|
log.info("Methods compiled: " + methodCount);
|
||||||
|
}
|
||||||
|
|
||||||
private void copySourceFiles() {
|
private void copySourceFiles() {
|
||||||
if (vm.getWrittenClasses() == null) {
|
if (vm.getWrittenClasses() == null) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user