Skip to content

Commit 80a1594

Browse files
committed
the meter should be always active
1 parent 7be51e6 commit 80a1594

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/DefaultIndexChangedListener.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ public void fileAdd(String path, String analyzer) {
4949
if (LOGGER.isLoggable(Level.FINE)) {
5050
LOGGER.log(Level.FINE, "Add: ''{0}'' ({1})", new Object[]{path, analyzer});
5151
}
52-
if (LOGGER.isLoggable(Level.FINEST)) {
53-
statMap.put(path, new Statistics());
54-
}
52+
statMap.put(path, new Statistics());
5553
}
5654

5755
@Override
@@ -61,12 +59,12 @@ public void fileRemove(String path) {
6159

6260
@Override
6361
public void fileAdded(String path, String analyzer) {
64-
if (LOGGER.isLoggable(Level.FINEST)) {
65-
Statistics stat = statMap.get(path);
66-
if (stat != null) {
67-
stat.report(LOGGER, Level.FINEST, String.format("Added: '%s' (%s)", path, analyzer),
68-
"indexer.file.add.latency");
69-
statMap.remove(path, stat);
62+
Statistics stat = statMap.get(path);
63+
if (stat != null) {
64+
stat.report(LOGGER, Level.FINEST, String.format("Added: '%s' (%s)", path, analyzer),
65+
"indexer.file.add.latency");
66+
statMap.remove(path, stat);
67+
if (LOGGER.isLoggable(Level.FINEST)) {
7068
return;
7169
}
7270
}

0 commit comments

Comments
 (0)