Bug 1348727 - Write validation summary information to the sync logs r=tcsc draft
authorJeongkyu Kim <jeongkyu.kim@gmail.com>
Sat, 24 Jun 2017 02:08:43 +0900
changeset 599785 de2b49d55f4cbb4926475851deae298a16423ec9
parent 599733 594cc32b632396a867ef1f98428968b224d82151
child 634854 f5f4416ed38b37105e22acc1e23fa3f035e43b90
push id65606
push userbmo:jeongkyu.kim@gmail.com
push dateFri, 23 Jun 2017 17:09:17 +0000
reviewerstcsc
bugs1348727
milestone56.0a1
Bug 1348727 - Write validation summary information to the sync logs r=tcsc MozReview-Commit-ID: GRf0DeDhFqP
services/sync/modules/bookmark_validator.js
--- a/services/sync/modules/bookmark_validator.js
+++ b/services/sync/modules/bookmark_validator.js
@@ -838,16 +838,23 @@ class BookmarkValidator {
     let clientTree = await PlacesUtils.promiseBookmarksTree("", {
       includeItemIds: true
     });
     let serverState = await this._getServerState(engine);
     let serverRecordCount = serverState.length;
     let result = await this.compareServerWithClient(serverState, clientTree);
     let end = Date.now();
     let duration = end - start;
+
+    engine._log.debug(`Validated bookmarks in ${duration}ms`);
+    engine._log.debug(`Problem summary`);
+    for (let { name, count } of result.problemData.getSummary()) {
+      engine._log.debug(`  ${name}: ${count}`);
+    }
+
     return {
       duration,
       version: this.version,
       problems: result.problemData,
       recordCount: serverRecordCount
     };
   }