Moved I/O alert to file reader
This commit is contained in:
@@ -18,8 +18,11 @@ public class GraphDataObjectWriter {
|
|||||||
|
|
||||||
public void writeDataToFile() {
|
public void writeDataToFile() {
|
||||||
try (BufferedOutputStream bufferedOut = new BufferedOutputStream(new FileOutputStream(filename));
|
try (BufferedOutputStream bufferedOut = new BufferedOutputStream(new FileOutputStream(filename));
|
||||||
|
|
||||||
ObjectOutputStream out = new ObjectOutputStream(bufferedOut);
|
ObjectOutputStream out = new ObjectOutputStream(bufferedOut);
|
||||||
){
|
){
|
||||||
|
System.out.println("Writing graph and occupancy data to file. This may take some time.");
|
||||||
|
System.out.println("File I/O time is not included in results.");
|
||||||
out.writeObject(data);
|
out.writeObject(data);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|||||||
@@ -232,8 +232,6 @@ public class InteractiveInterface {
|
|||||||
GraphWithMapData data = Simulator.makeGraph(cells, plate, true);
|
GraphWithMapData data = Simulator.makeGraph(cells, plate, true);
|
||||||
assert filename != null;
|
assert filename != null;
|
||||||
GraphDataObjectWriter dataWriter = new GraphDataObjectWriter(filename, data);
|
GraphDataObjectWriter dataWriter = new GraphDataObjectWriter(filename, data);
|
||||||
System.out.println("Writing graph and occupancy data to file. This may take some time.");
|
|
||||||
System.out.println("File I/O time is not included in results.");
|
|
||||||
dataWriter.writeDataToFile();
|
dataWriter.writeDataToFile();
|
||||||
System.out.println("Graph and Data file written to: " + filename);
|
System.out.println("Graph and Data file written to: " + filename);
|
||||||
System.gc();
|
System.gc();
|
||||||
|
|||||||
Reference in New Issue
Block a user