for (int i = 0; i < 10; ++i) {
long t = System.currentTimeMillis();
for (int j = 0; j < classes.size(); ++j) {
byte[] b = (byte[]) classes.get(j);
new ClassReader(b).accept(new ClassNode(), 0);
}
t = System.currentTimeMillis() - t;
System.out.println("Time to deserialize " + classes.size()
+ " classes with tree package = " + t + " ms");
}
for (int i = 0; i < 10; ++i) {
long t = System.currentTimeMillis();
for (int j = 0; j < classes.size(); ++j) {
byte[] b = (byte[]) classes.get(j);
ClassWriter cw = new ClassWriter(0);
ClassNode cn = new ClassNode();
new ClassReader(b).accept(cn, 0);
cn.accept(cw);
cw.toByteArray();
}
t = System.currentTimeMillis() - t;
System.out.println("Time to deserialize and reserialize "
+ classes.size() + " classes with tree package = " + t
+ " ms");
}
for (int i = 0; i < 10; ++i) {
int errors = 0;
long t = System.currentTimeMillis();
for (int j = 0; j < classes.size() / 10; ++j) {
byte[] b = (byte[]) classes.get(j);
ClassReader cr = new ClassReader(b);
ClassNode cn = new ClassNode();
cr.accept(cn, ClassReader.SKIP_DEBUG);
List methods = cn.methods;
for (int k = 0; k < methods.size(); ++k) {
MethodNode method = (MethodNode) methods.get(k);
Analyzer a = new Analyzer(new SimpleVerifier());