= Updated utils and logging subsystem formatting

This commit is contained in:
Matthew Cech
2019-06-19 22:14:13 -07:00
parent 5e531a19b7
commit 06317a4528
58 changed files with 205 additions and 202 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ public class BenchmarkInput
return;
raw = raw.trim();
int whitespacePos = StringUtils.FindFirstWhitespace(raw);
int whitespacePos = StringUtils.findFirstWhitespace(raw);
if(whitespacePos == -1)
{
+3 -3
View File
@@ -5,7 +5,7 @@ import utils.GlobalLog;
//Logging shim
public class BenchmarkLog
{
public static void log(String str) { GlobalLog.Log("[Benchmark] " + str); }
public static void warn(String str) { GlobalLog.Warn("[Benchmark] " + str); }
public static void error(String str) { GlobalLog.Error(" [Benchmark] " + str); }
public static void log(String str) { GlobalLog.log("[Benchmark] " + str); }
public static void warn(String str) { GlobalLog.warn("[Benchmark] " + str); }
public static void error(String str) { GlobalLog.error(" [Benchmark] " + str); }
}
+4 -4
View File
@@ -35,7 +35,7 @@ public class BenchmarkManager
rebuildLookup();
BenchmarkLog.log("Took " + (Instant.now().toEpochMilli() - start) + " ms to load " + raw.size() + " entries from " + directoryMonitor.GetCurrentFiles().size() + " file" + (raw.size() > 1 ? "s" : ""));
BenchmarkLog.log("Took " + (Instant.now().toEpochMilli() - start) + " ms to load " + raw.size() + " entries from " + directoryMonitor.getCurrentFiles().size() + " file" + (raw.size() > 1 ? "s" : ""));
}
// Rebuilds the files being monitored
@@ -50,14 +50,14 @@ public class BenchmarkManager
synchronized(directoryMonitor)
{
files = directoryMonitor.GetCurrentFiles();
files = directoryMonitor.getCurrentFiles();
}
if(files != null)
{
for(MonitoredFile mf : files)
{
String contents = FileUtils.ReadContent(mf.path);
String contents = FileUtils.readContent(mf.path);
String[] lines = contents.split(lineDelimiter);
for(int i = 1; i < lines.length; ++i)
@@ -169,7 +169,7 @@ public class BenchmarkManager
public void update()
{
needsUpdate = false;
directoryMonitor.Update(this::onRescan, this::onRescan, this::onRescan);
directoryMonitor.update(this::onRescan, this::onRescan, this::onRescan);
if(needsUpdate)
rebuildLookup();