()
| 1462 | } |
| 1463 | |
| 1464 | logStatistics() { |
| 1465 | const logger = /** @type {Logger} */ (this.logger); |
| 1466 | /** |
| 1467 | * Processes the provided header. |
| 1468 | * @param {string} header header |
| 1469 | * @param {string | undefined} message message |
| 1470 | */ |
| 1471 | const logWhenMessage = (header, message) => { |
| 1472 | if (message) { |
| 1473 | logger.log(`${header}: ${message}`); |
| 1474 | } |
| 1475 | }; |
| 1476 | logger.log(`${this._statCreatedSnapshots} new snapshots created`); |
| 1477 | logger.log( |
| 1478 | `${ |
| 1479 | this._statTestedSnapshotsNotCached && |
| 1480 | Math.round( |
| 1481 | (this._statTestedSnapshotsNotCached * 100) / |
| 1482 | (this._statTestedSnapshotsCached + |
| 1483 | this._statTestedSnapshotsNotCached) |
| 1484 | ) |
| 1485 | }% root snapshot uncached (${this._statTestedSnapshotsNotCached} / ${ |
| 1486 | this._statTestedSnapshotsCached + this._statTestedSnapshotsNotCached |
| 1487 | })` |
| 1488 | ); |
| 1489 | logger.log( |
| 1490 | `${ |
| 1491 | this._statTestedChildrenNotCached && |
| 1492 | Math.round( |
| 1493 | (this._statTestedChildrenNotCached * 100) / |
| 1494 | (this._statTestedChildrenCached + this._statTestedChildrenNotCached) |
| 1495 | ) |
| 1496 | }% children snapshot uncached (${this._statTestedChildrenNotCached} / ${ |
| 1497 | this._statTestedChildrenCached + this._statTestedChildrenNotCached |
| 1498 | })` |
| 1499 | ); |
| 1500 | logger.log(`${this._statTestedEntries} entries tested`); |
| 1501 | logger.log( |
| 1502 | `File info in cache: ${this._fileTimestamps.size} timestamps ${this._fileHashes.size} hashes ${this._fileTshs.size} timestamp hash combinations` |
| 1503 | ); |
| 1504 | logWhenMessage( |
| 1505 | class="st">"File timestamp snapshot optimization", |
| 1506 | this._fileTimestampsOptimization.getStatisticMessage() |
| 1507 | ); |
| 1508 | logWhenMessage( |
| 1509 | class="st">"File hash snapshot optimization", |
| 1510 | this._fileHashesOptimization.getStatisticMessage() |
| 1511 | ); |
| 1512 | logWhenMessage( |
| 1513 | class="st">"File timestamp hash combination snapshot optimization", |
| 1514 | this._fileTshsOptimization.getStatisticMessage() |
| 1515 | ); |
| 1516 | logger.log( |
| 1517 | `Directory info in cache: ${this._contextTimestamps.size} timestamps ${this._contextHashes.size} hashes ${this._contextTshs.size} timestamp hash combinations` |
| 1518 | ); |
| 1519 | logWhenMessage( |
| 1520 | class="st">"Directory timestamp snapshot optimization", |
| 1521 | this._contextTimestampsOptimization.getStatisticMessage() |
no test coverage detected