Skip to content

Commit

Permalink
Split tables with an extra line when writing to disk
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed May 29, 2013
1 parent 6f97fe8 commit 203d4f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -180,7 +180,9 @@ public void tickStart(final EnumSet<TickType> type, final Object... tickData) {
@Override
public void run() {
try {
Files.write(entityTickProfiler.writeData(new TableFormatter(MinecraftServer.getServer())).toString(), profilingFile, Charsets.UTF_8);
TableFormatter tf = new TableFormatter(MinecraftServer.getServer());
tf.tableSeparator = "\n";
Files.write(entityTickProfiler.writeData(tf).toString(), profilingFile, Charsets.UTF_8);
} catch (Throwable t) {
Log.severe("Failed to save periodic profiling data to " + profilingFile, t);
}
Expand Down
2 changes: 2 additions & 0 deletions src/common/me/nallar/tickprofiler/util/TableFormatter.java
Expand Up @@ -16,6 +16,7 @@ public class TableFormatter {
public String headingSplitter = " | ";
public String headingColour = "";
public String rowColour = "";
public String tableSeparator = "";

public TableFormatter(ICommandSender commandSender) {
boolean chat = commandSender instanceof Entity;
Expand Down Expand Up @@ -82,6 +83,7 @@ public void finishTable() {
cSplit = "";
}
}
sb.append(tableSeparator);
currentHeadings.clear();
currentData.clear();
}
Expand Down

0 comments on commit 203d4f5

Please sign in to comment.