From: jjenista Date: Thu, 18 Nov 2010 22:30:42 +0000 (+0000) Subject: close this file so it actually writes out X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3aad6c406abb6535cf0af0d038b16f59dd1a82f3;p=IRC.git close this file so it actually writes out --- diff --git a/Robust/CoreProf/Trace.java b/Robust/CoreProf/Trace.java index 7d9eefd8..0d4cf988 100644 --- a/Robust/CoreProf/Trace.java +++ b/Robust/CoreProf/Trace.java @@ -154,6 +154,12 @@ public class Trace { initNames(); + if( convert2txt ) { + try { + txtStream = new BufferedWriter( new FileWriter( "events.txt" ) ); + } catch( Exception e ) { e.printStackTrace(); System.exit( -1 ); } + } + if (convert2plot) { printPlotCmd(); } @@ -170,6 +176,12 @@ public class Trace { printStats( outFile ); + if( convert2txt ) { + try { + txtStream.close(); + } catch( Exception e ) { e.printStackTrace(); System.exit( -1 ); } + } + if( convert2plot ) { try { bwPlot.write("plot [0:"+(globendtime/scale)+"] [-1:"+(numThreads+1)+"] -3\n"); @@ -303,8 +315,6 @@ public class Trace { if( convert2txt ) { try { - txtStream = new BufferedWriter( new FileWriter( "events.txt" ) ); - txtStream.write( "\n\n\n\n" ); txtStream.write( "*************************************************\n" ); txtStream.write( "** Thread "+tNum+"\n" );