|
18 | 18 | */
|
19 | 19 |
|
20 | 20 | /*
|
21 |
| - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved. |
| 21 | + * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. |
22 | 22 | * Portions Copyright (c) 2017, 2020, Chris Fraire <[email protected]>.
|
23 | 23 | */
|
24 | 24 | package org.opengrok.indexer.index;
|
@@ -474,15 +474,17 @@ public void update() throws IOException {
|
474 | 474 | Statistics elapsed = new Statistics();
|
475 | 475 | LOGGER.log(Level.INFO, "Starting traversal of directory {0}", dir);
|
476 | 476 | indexDown(sourceRoot, dir, args);
|
477 |
| - elapsed.report(LOGGER, String.format("Done traversal of directory %s", dir)); |
| 477 | + elapsed.report(LOGGER, String.format("Done traversal of directory %s", dir), |
| 478 | + "indexer.db.directory.traversal"); |
478 | 479 |
|
479 | 480 | showFileCount(dir, args);
|
480 | 481 |
|
481 | 482 | args.cur_count = 0;
|
482 | 483 | elapsed = new Statistics();
|
483 | 484 | LOGGER.log(Level.INFO, "Starting indexing of directory {0}", dir);
|
484 | 485 | indexParallel(dir, args);
|
485 |
| - elapsed.report(LOGGER, String.format("Done indexing of directory %s", dir)); |
| 486 | + elapsed.report(LOGGER, String.format("Done indexing of directory %s", dir), |
| 487 | + "indexer.db.directory.index"); |
486 | 488 |
|
487 | 489 | // Remove data for the trailing terms that indexDown()
|
488 | 490 | // did not traverse. These correspond to files that have been
|
@@ -610,7 +612,8 @@ public void optimize() throws IOException {
|
610 | 612 |
|
611 | 613 | wrt = new IndexWriter(indexDirectory, conf);
|
612 | 614 | wrt.forceMerge(1); // this is deprecated and not needed anymore
|
613 |
| - elapsed.report(LOGGER, String.format("Done optimizing index%s", projectDetail)); |
| 615 | + elapsed.report(LOGGER, String.format("Done optimizing index%s", projectDetail), |
| 616 | + "indexer.db.optimize"); |
614 | 617 | synchronized (lock) {
|
615 | 618 | if (dirtyFile.exists() && !dirtyFile.delete()) {
|
616 | 619 | LOGGER.log(Level.FINE, "Failed to remove \"dirty-file\": {0}",
|
|
0 commit comments