Skip to content

Commit dcb8c04

Browse files
committed
Log the execution time for updating commands
1 parent 8590492 commit dcb8c04

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/org/netbeans/modules/php/wordpress/commands/WordPressCli.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import java.util.List;
5555
import java.util.concurrent.ExecutionException;
5656
import java.util.concurrent.Future;
57+
import static java.util.logging.Level.INFO;
5758
import java.util.logging.Logger;
5859
import static java.util.logging.Level.WARNING;
5960
import org.netbeans.api.extexecution.ExecutionDescriptor;
@@ -362,6 +363,7 @@ public List<FrameworkCommand> getCommands(boolean isForce) {
362363
}
363364

364365
public void updateCommands() {
366+
long startTime = System.currentTimeMillis();
365367
COMMANDS_CACHE.clear();
366368
getCommands(Collections.<String>emptyList(), COMMANDS_CACHE);
367369
if (COMMANDS_CACHE.isEmpty()) {
@@ -375,6 +377,8 @@ public void updateCommands() {
375377
WordPressOptions.getInstance().setWpCliCommandList(commadlist);
376378
}
377379
}
380+
long endTime = System.currentTimeMillis();
381+
LOGGER.log(INFO, "Update Commands: took {0}ms", endTime - startTime); // NOI18N
378382
}
379383

380384
// XXX get help later?

0 commit comments

Comments
 (0)