reset lastEpochMilli when opening a new export file
This commit is contained in:
@@ -78,6 +78,7 @@ public class PdbExport {
|
|||||||
|
|
||||||
long count = 0;
|
long count = 0;
|
||||||
long lastEpochMilli = 0;
|
long lastEpochMilli = 0;
|
||||||
|
long begin = System.currentTimeMillis();
|
||||||
|
|
||||||
for (final PdbFile pdbFile : pdbFiles) {
|
for (final PdbFile pdbFile : pdbFiles) {
|
||||||
|
|
||||||
@@ -90,6 +91,8 @@ public class PdbExport {
|
|||||||
exportFiles.add(exportFile);
|
exportFiles.add(exportFile);
|
||||||
writer = createWriter(exportFile);
|
writer = createWriter(exportFile);
|
||||||
LOGGER.info("new export file: {}", exportFile);
|
LOGGER.info("new export file: {}", exportFile);
|
||||||
|
|
||||||
|
lastEpochMilli = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Stream<LongList> timeValueStream = PdbFile.toStream(Arrays.asList(pdbFile), db.getDataStore());
|
final Stream<LongList> timeValueStream = PdbFile.toStream(Arrays.asList(pdbFile), db.getDataStore());
|
||||||
@@ -97,6 +100,7 @@ public class PdbExport {
|
|||||||
final Tags tags = pdbFile.getTags();
|
final Tags tags = pdbFile.getTags();
|
||||||
final long tagsId = addNewTagsToDictionary(writer, tags, tagsIdCounter);
|
final long tagsId = addNewTagsToDictionary(writer, tags, tagsIdCounter);
|
||||||
|
|
||||||
|
|
||||||
final Iterator<LongList> it = timeValueStream.iterator();
|
final Iterator<LongList> it = timeValueStream.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
final LongList entry = it.next();
|
final LongList entry = it.next();
|
||||||
@@ -117,8 +121,13 @@ public class PdbExport {
|
|||||||
writer.write('\n');
|
writer.write('\n');
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
if (count % 100000 == 0) {
|
final long chunk = 10_000_000;
|
||||||
LOGGER.info("progress: " + count);
|
if (count % chunk == 0) {
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long duration = end-begin;
|
||||||
|
long entriesPerSecond = (long)((double)chunk / (duration / 1000.0));
|
||||||
|
LOGGER.info("progress: {} - {} entries/s + duration {}" , String.format("%,d",count), String.format("%,d",entriesPerSecond), duration);
|
||||||
|
begin = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user