public void run(String basePath) throws IOException { Logger webSeeLog = Util.getNewLogger( basePath + File.separatorChar + "WebSee_statistics.txt", "WebSee_statistics" + System.currentTimeMillis()); webSeeLog.info(""); webSeeLog.info("--------------------------------------------------------------------------"); webSeeLog.info("Test case" + "\t" + "Rank" + "\t" + "Result set size" + "\t" + "Hit/Miss"); BufferedReader br = new BufferedReader(new FileReader(basePath + "/description.txt")); String line; while ((line = br.readLine()) != null) { String[] lineSplit = line.split("\t"); String id = lineSplit[1]; if (id.equals("no seeding")) { System.out.println("skip"); continue; } String testFolder = lineSplit[8]; String xpath = lineSplit[7]; try { WebSeeTestCase wstc = new WebSeeTestCase(basePath + "/" + testFolder); wstc.run(xpath, webSeeLog, this); wstc.cleanIntermediateFiles(); } catch (Exception e) { System.err.println(testFolder); System.err.println(e.getMessage()); e.printStackTrace(); } // Compute WebSee statistics double mean = webSeeRankStats.getMean(); double std = webSeeRankStats.getStandardDeviation(); double median = webSeeRankStats.getPercentile(50); webSeeLog.info(""); webSeeLog.info("\t\t\t\t\tResults so far"); webSeeLog.info("\t\t\t\t\tMean rank = " + mean); webSeeLog.info("\t\t\t\t\tMedian rank = " + median); webSeeLog.info("\t\t\t\t\tStandard deviation rank = " + std); } br.close(); // Compute WebSee statistics webSeeLog.info(""); webSeeLog.info("-------- FINAL RESULTS --------"); webSeeLog.info(""); webSeeLog.info("Mean rank = " + webSeeRankStats.getMean()); webSeeLog.info("Median rank = " + webSeeRankStats.getPercentile(50)); webSeeLog.info("Standard deviation rank = " + webSeeRankStats.getStandardDeviation()); webSeeLog.info(""); webSeeLog.info("Mean result set size = " + webSeeResultSetSizeStats.getMean()); webSeeLog.info("Median result set size = " + webSeeResultSetSizeStats.getPercentile(50)); webSeeLog.info( "Standard deviation result set size = " + webSeeResultSetSizeStats.getStandardDeviation()); webSeeLog.info(""); webSeeLog.info("Mean distance = " + webSeeDistanceStats.getMean()); webSeeLog.info("Median distance = " + webSeeDistanceStats.getPercentile(50)); webSeeLog.info("Standard deviation distance = " + webSeeDistanceStats.getStandardDeviation()); webSeeLog.info(""); webSeeLog.info("Mean P1 time = " + webSeeP1TimeStats.getMean()); webSeeLog.info("Mean P2 time = " + webSeeP2TimeStats.getMean()); webSeeLog.info("Mean P3 time = " + webSeeP3TimeStats.getMean()); webSeeLog.info("Mean P4 time = " + webSeeP4TimeStats.getMean()); webSeeLog.info("Mean P5 time = " + webSeeP5TimeStats.getMean()); webSeeLog.info("Mean Total time = " + webSeeTotalTimeStats.getMean()); }