= Updated utils and logging subsystem formatting
This commit is contained in:
@@ -19,7 +19,7 @@ public class BenchmarkInput
|
||||
return;
|
||||
|
||||
raw = raw.trim();
|
||||
int whitespacePos = StringUtils.FindFirstWhitespace(raw);
|
||||
int whitespacePos = StringUtils.findFirstWhitespace(raw);
|
||||
|
||||
if(whitespacePos == -1)
|
||||
{
|
||||
|
||||
@@ -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); }
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user