Skip to content

Conversation

@adam-fowler
Copy link
Member

@adam-fowler adam-fowler commented Oct 6, 2025

An initial attempt at integrating swift-configuration

let router = Router()
    .get("hello") { request, _ -> String in
        return "Hello"
    }
let httpConfig = configReader.scoped(to: "http")
let app = Application(
    router: router,
    server: .http1(configuration: .init(reader: httpConfig))
    configuration: .init(reader: httpConfig)
)
// run hummingbird application
try await app.runService()

@adam-fowler adam-fowler requested a review from Joannis as a code owner October 6, 2025 16:27
@adam-fowler adam-fowler marked this pull request as draft October 6, 2025 16:27
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.39%. Comparing base (8220370) to head (bed2b52).

Files with missing lines Patch % Lines
...urces/HummingbirdTLS/TLSChannel+ConfigReader.swift 80.95% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #743      +/-   ##
==========================================
- Coverage   84.43%   84.39%   -0.05%     
==========================================
  Files         117      121       +4     
  Lines        7723     7779      +56     
==========================================
+ Hits         6521     6565      +44     
- Misses       1202     1214      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

✅ Pull request no significant performance differences ✅

Summary

New baseline 'pull_request' is WITHIN the 'main' baseline thresholds.

Full Benchmark Comparison

Comparing results between 'main' and 'pull_request'

Host 'f5174b09e2bf' with 4 'x86_64' processors with 15 GB memory, running:
#18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025

Router

Router:Echo metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 769 769 769 769 769 769 769 994
pull_request 769 769 769 769 769 769 769 994
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

Router:GET metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 468 468 468 468 468 468 468 2876
pull_request 468 468 468 468 468 468 468 2879
Δ 0 0 0 0 0 0 0 3
Improvement % 0 0 0 0 0 0 0 3

Router:Middleware metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 373 373 373 373 373 373 373 2689
pull_request 373 373 373 373 373 373 373 2670
Δ 0 0 0 0 0 0 0 -19
Improvement % 0 0 0 0 0 0 0 -19

Router:PUT metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 1272 1272 1272 1272 1272 1272 1272 791
pull_request 1272 1272 1272 1272 1272 1272 1272 784
Δ 0 0 0 0 0 0 0 -7
Improvement % 0 0 0 0 0 0 0 -7

Router:Parameters metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 718 718 718 718 718 718 718 2395
pull_request 718 718 718 718 718 718 718 2339
Δ 0 0 0 0 0 0 0 -56
Improvement % 0 0 0 0 0 0 0 -56

RouterBuilder:Middleware metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 372 372 372 372 372 372 372 2737
pull_request 372 372 372 372 372 372 372 2612
Δ 0 0 0 0 0 0 0 -125
Improvement % 0 0 0 0 0 0 0 -125

TrieRouter:LongPaths metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 11 11 11 11 11 11 11 239
pull_request 11 11 11 11 11 11 11 239
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

TrieRouter:Parameters metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 19 19 19 19 19 19 19 186
pull_request 19 19 19 19 19 19 19 182
Δ 0 0 0 0 0 0 0 -4
Improvement % 0 0 0 0 0 0 0 -4

TrieRouter:Routing metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 13 13 13 13 13 13 13 238
pull_request 13 13 13 13 13 13 13 235
Δ 0 0 0 0 0 0 0 -3
Improvement % 0 0 0 0 0 0 0 -3

Copy link
Contributor

@tib tib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was quick, @adam-fowler. Looks good to me. Also a great example of how to integrate Swift Configuration using Traits, including Swift version support. 👍

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.

4 participants