/** * Ecrit les stats dans un fichier dans /tmp */ protected void logAnalysisToFile() { Map<String, CallStatisticsSummary> allStats = CallAnalyse.getSummary(); FileWriter writer = null; try { File f = new File("/tmp", "ibu-stats-" + System.currentTimeMillis()); writer = new FileWriter(f, false); for (String name : allStats.keySet()) { CallStatistics stats = allStats.get(name); String str = stats.getAvgTime() + getPadding(stats.getAvgTime()) + stats; writer.write(str + "\n"); } } catch (IOException ioe) { log.error("Error opening or writing file", ioe); } finally { if (writer != null) { try { writer.close(); } catch (IOException ioe) { log.error("Error closing file", ioe); } } } } } //ManagerInjector
/** * Ecrit les stats dans un fichier dans /tmp */ protected void logAnalysisToFile() { Map<String, CallStatisticsSummary> allStats = CallAnalyse.getSummary(); FileWriter writer = null; try { File f = new File("/tmp", "ibu-stats-" + System.currentTimeMillis()); writer = new FileWriter(f, false); for (String name : allStats.keySet()) { CallStatistics stats = allStats.get(name); String str = stats.getAvgTime() + getPadding(stats.getAvgTime()) + stats; writer.write(str + "\n"); } } catch (IOException ioe) { log.error("Error opening or writing file", ioe); } finally { if (writer != null) { try { writer.close(); } catch (IOException ioe) { log.error("Error closing file", ioe); } } } } } //ManagerInjector