private void logFileTimes(MetaFile metaFile, long time) { System.out.println(metaFile.getPath() + " has " + metaFile.getLineNumber() + " line numbers."); System.out.println( "Generating a tree took " + new DecimalFormat("#.######") .format(((double) (System.nanoTime() - time)) / 1000000000) + " secondes."); System.out.println(); }
private void analyse(String[] rootPaths) throws Exception { long totaalTime = System.nanoTime(); List<MetaFile> paths = walk("C:\\Users\\Thomas\\workspace"); int totalLineNumbers = 0; int totalNumberOfFiles = 0; for (MetaFile metaFile : paths) { long time = System.nanoTime(); totalLineNumbers += metaFile.getLineNumber(); makeTree(metaFile.getPath()); logFileTimes(metaFile, time); totalNumberOfFiles++; } System.out.println(totalNumberOfFiles + " files and trees."); System.out.println( "Total time is " + new DecimalFormat("#.######") .format(((double) (System.nanoTime() - totaalTime)) / 1000000000) + " secondes for " + totalLineNumbers + " line numbers."); }