Skip to content

Commit 400bd09

Browse files
Add timer
1 parent cf225f9 commit 400bd09

File tree

1 file changed

+8
-0
lines changed
  • firebase-firestore/src/main/java/com/google/firebase/firestore/local

1 file changed

+8
-0
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteSchema.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ void runSchemaUpgrades(int fromVersion) {
9797
* otherwise for testing.
9898
*/
9999
void runSchemaUpgrades(int fromVersion, int toVersion) {
100+
long startTime = System.currentTimeMillis();
100101
/*
101102
* New migrations should be added at the end of the series of `if` statements and should follow
102103
* the pattern. Make sure to increment `VERSION` and to read the comment below about
@@ -199,6 +200,13 @@ void runSchemaUpgrades(int fromVersion, int toVersion) {
199200
Preconditions.checkState(Persistence.INDEXING_SUPPORT_ENABLED);
200201
createFieldIndex();
201202
}
203+
204+
Logger.debug(
205+
"SQLiteSchema",
206+
"Migration from version %s to %s took %s milliseconds",
207+
fromVersion,
208+
toVersion,
209+
System.currentTimeMillis() - startTime);
202210
}
203211

204212
/**

0 commit comments

Comments
 (0)