void () { syncMetrics.getOrStartSpan(Phase.WORKSPACE_MODEL_APPLY.name(), ExternalSystemSyncDiagnostic.gradleSyncSpanName); if (activityId != null) { ExternalSystemSyncActionsCollector.logPhaseStarted(project, activityId, Phase.WORKSPACE_MODEL_APPLY); } final long startTime = System.currentTimeMillis(); modelsProvider.commit(); final long timeInMs = System.currentTimeMillis() - startTime; if (activityId != null) { syncMetrics.endSpan(Phase.WORKSPACE_MODEL_APPLY.name()); ExternalSystemSyncActionsCollector.logPhaseFinished(project, activityId, Phase.WORKSPACE_MODEL_APPLY, timeInMs); } LOG.debug(String.format("%s committed in %d ms", commitDesc, timeInMs)); }