X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=JavaAnalysisToolsDemo%2Fsrc%2Fdemo%2Fwala%2FClassHierarchyPerformance.java;h=da88cd0137509214310d7bcdda127044062fc131;hb=HEAD;hp=0390cfb3fcd70f1f8544cf32a08f9e79d2845839;hpb=2f51dd71ca31a30e95407943c31cb7f0706e0c95;p=soba%2FJavaAnalysisToolsDemo.git diff --git a/JavaAnalysisToolsDemo/src/demo/wala/ClassHierarchyPerformance.java b/JavaAnalysisToolsDemo/src/demo/wala/ClassHierarchyPerformance.java index 0390cfb..da88cd0 100644 --- a/JavaAnalysisToolsDemo/src/demo/wala/ClassHierarchyPerformance.java +++ b/JavaAnalysisToolsDemo/src/demo/wala/ClassHierarchyPerformance.java @@ -29,8 +29,7 @@ public class ClassHierarchyPerformance { AnalysisOptions options = new AnalysisOptions(scope, entrypoints); CallGraphBuilder builder = Util.makeZeroCFABuilder(options, new AnalysisCache(), cha, scope); CallGraph cg = builder.makeCallGraph(options, null); - for (Iterator itr = cg.iterator(); itr.hasNext();) { - CGNode caller = itr.next(); + for (CGNode caller: cg) { for (Iterator callees = cg.getSuccNodes(caller); callees.hasNext();) { CGNode callee = callees.next(); IMethod callerMethod = caller.getMethod(); @@ -38,6 +37,7 @@ public class ClassHierarchyPerformance { // System.out.println(callerMethod.toString() + " -> " + calleeMethod.toString()); } } + long end = System.currentTimeMillis(); System.err.println((end - start) + " [ms]");