small enhancements

This commit is contained in:
2016-12-10 15:36:06 +01:00
parent 4376f8f783
commit 81b39c5675
4 changed files with 8 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ public class Entry {
Entry(final long epochMilli, final long value, final Tags tags) {
if (value < 0 || value > MAX_VALUE) {
throw new IllegalArgumentException("value must be between 0 and " + MAX_VALUE);
throw new IllegalArgumentException("value must be between 0 and " + MAX_VALUE + ", but was " + value);
}
this.epochMilli = epochMilli;

View File

@@ -83,14 +83,12 @@ public class PerformanceDb implements AutoCloseable {
}
final Entry entry = entryOptional.get();
final long epochMilli = entry.getEpochMilli();
final long value = entry.getValue();
final Tags tags = entry.getTags();
final OffsetDateTime date = entry.getDate();
final PdbWriter writer = manager.get(tags, date);
writer.write(epochMilli, value);
writer.write(entry);
count++;
}