Fixed for Timer.saveData()
This commit is contained in:
parent
41949b63f6
commit
ff2c100664
1 changed files with 3 additions and 2 deletions
|
@ -127,10 +127,11 @@ public class Timer {
|
|||
private void saveData(String op) {
|
||||
try {
|
||||
File f = new File(DATA_DIR, op.replace(" ", "_") + ".txt");
|
||||
assertTrue(f.createNewFile());
|
||||
if (!f.createNewFile()) {
|
||||
throw new IOException("Couldn't create file: " + f);
|
||||
}
|
||||
OutputStream stream = new BufferedOutputStream(new FileOutputStream(f));
|
||||
for (Long duration : stats.get(op)) {
|
||||
// log.info(duration);
|
||||
IOUtils.write(duration.toString(), stream);
|
||||
IOUtils.write("\n", stream);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue