Skip to content

Commit f2032f7

Browse files
committed
beautify
1 parent 9d94ea2 commit f2032f7

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/main/java/com/uid2/operator/store/CloudSyncOptOutStore.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,31 +578,44 @@ private OptOutStoreSnapshot updateIndex(IndexUpdateMessage ium) throws IOExcepti
578578
return this;
579579
}
580580

581+
final long optoutLoadingStart = System.currentTimeMillis();
581582
IndexUpdateContext iuc = IndexUpdateContext.fromMessage(ium);
582583

583584
// load all partition files
584585
for (String filePath : ium.getPartitionsToAdd()) {
585586
LOGGER.info("Reading optout partition file : " + filePath);
587+
final long fileStart = System.currentTimeMillis();
586588
byte[] data = this.loadFile(filePath);
589+
final long fileEnd = System.currentTimeMillis();
587590
if (data.length == 0) {
588591
LOGGER.warn("OptOut partition file is empty: " + filePath);
589592
continue;
590593
}
594+
LOGGER.info("OptOut partition file {} loaded in {} ms, {} bytes", filePath, fileEnd - fileStart, data.length);
591595
iuc.addLoadedPartition(filePath, data);
592596
}
593597

594598
// load all log files
595599
List<String> addDeltaFiles = ium.getDeltasToAdd();
596600
for (String filePath : addDeltaFiles) {
597601
LOGGER.trace("Reading optout delta file : " + filePath);
602+
final long fileStart = System.currentTimeMillis();
598603
byte[] data = loadFile(filePath);
604+
final long fileEnd = System.currentTimeMillis();
599605
if (data.length == 0) {
600606
LOGGER.warn("OptOut delta file is empty: " + filePath);
601607
continue;
602608
}
609+
LOGGER.trace("OptOut delta file {} loaded in {} ms, {} bytes", filePath, fileEnd - fileStart, data.length);
603610
iuc.addLoadedDelta(filePath, data);
604611
}
605612

613+
final long optoutLoadingEnd = System.currentTimeMillis();
614+
final int totalPartitionFiles = ium.getPartitionsToAdd().size();
615+
final int totalDeltaFiles = addDeltaFiles.size();
616+
LOGGER.info("OptOut files loading completed in {} ms, {} partition files, {} delta files",
617+
optoutLoadingEnd - optoutLoadingStart, totalPartitionFiles, totalDeltaFiles);
618+
606619
return this.updateIndexInternal(iuc);
607620
}
608621

0 commit comments

Comments
 (0)