Skip to content

Commit

Permalink
Add split timing for reading resources for fast check mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave committed Nov 3, 2023
1 parent 6055840 commit 4d1f6f6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ public List<MigrationResource> run(Connection connection) {
log.log(DEBUG, "no migrations to check");
return emptyList();
}
long splitMs = System.currentTimeMillis() - startMs;
final var platform = derivePlatform(migrationConfig, connection);
final var firstCheck = new FirstCheck(migrationConfig, connection, platform);
if (fastMode && firstCheck.fastModeCheck(resources.versions())) {
long checkMs = System.currentTimeMillis() - startMs;
log.log(INFO, "DB migrations completed in {0}ms - totalMigrations:{1}", checkMs, firstCheck.count());
log.log(INFO, "DB migrations completed in {0}ms - totalMigrations:{1} readResources:{2}ms", checkMs, firstCheck.count(), splitMs);
return emptyList();
}
// ensure running with autoCommit false
Expand Down

0 comments on commit 4d1f6f6

Please sign in to comment.