Skip to content

feat: capture per-version sync metrics with detailed + summary report - #44

Merged
cloudshiftchris merged 2 commits into
mainfrom
cloudshiftchris/sync-metrics
May 12, 2026
Merged

feat: capture per-version sync metrics with detailed + summary report#44
cloudshiftchris merged 2 commits into
mainfrom
cloudshiftchris/sync-metrics

Conversation

@cloudshiftchris

Copy link
Copy Markdown
Member

Summary

  • Adds a SyncMetrics accumulator that tracks each source version per artifact as in-sync, synced (with asset count, bytes, duration), or failed (with error message and duration).
  • MavenSyncEngine now wraps each version sync in try/catch with monotonic timing — failures are recorded and the worker continues to the next version (re-throws CancellationException so structured concurrency still works); copyAsset / uploadAsset return Long bytes so the engine can sum transfer size.
  • MavenSyncMain builds the metrics, passes them to the engine, and in a finally logs both the detailed (per artifact + per version) block and the summary block (artifacts, versions in sync / synced / failed, assets copied, bytes transferred, total duration).
  • New SyncMetricsTest plus three new MavenSyncEngineTest cases covering in-sync recording, synced bytes/asset counts, and the failure-continuation path.

Test plan

  • `./gradlew ktfmtFormat test` — all 39 tests passing
  • Run against a real source/target Maven pair and confirm the detailed + summary blocks appear at end of run

cloudshiftchris and others added 2 commits May 12, 2026 08:48
…port

Adds a SyncMetrics accumulator that tracks, per artifact and per version,
whether each source version was already in sync, newly synced (with asset
count, bytes, and duration), or failed (with error and duration). At the
end of each run main() logs a detailed block plus a summary covering total
artifacts, versions in sync, versions synced, versions failed, assets
copied, bytes transferred, and total duration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…metrics

# Conflicts:
#	src/test/kotlin/io/cloudshiftdev/mavensync/FakeMavenHttpRepository.kt
@cloudshiftchris
cloudshiftchris merged commit ceaf90f into main May 12, 2026
1 of 2 checks passed
@cloudshiftchris
cloudshiftchris deleted the cloudshiftchris/sync-metrics branch May 12, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant