Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#22 Compute median of server response deltas instead of average #46

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

lukevalenta
Copy link
Contributor

To test:

./getroughtime -config config.json
Cloudflare-Roughtime: 2024-03-12 10:54:47 -0400 EDT ±1s (in 48ms)
Int08-Roughtime: 2024-03-12 10:54:47.247468 -0400 EDT ±1s (in 29ms)
skipped Google-Roughtime: no reply
Cloudflare-Roughtime-2: 2024-03-12 10:54:50 -0400 EDT ±1s (in 50ms)
Delta: -171ms

cat config.json
{
    "servers": [
        {
            "name": "Cloudflare-Roughtime",
            "version": "IETF-Roughtime",
            "publicKeyType": "ed25519",
            "publicKey": "gD63hSj3ScS+wuOeGrubXlq35N1c5Lby/S+T7MNTjxo=",
            "addresses": [
                    {
                        "protocol": "udp4",
                        "address": "roughtime.cloudflare.com:2002"
                    }
            ]
        },
        {
            "name": "Int08-Roughtime",
            "version": "Google-Roughtime",
            "publicKeyType": "ed25519",
            "publicKey": "AW5uAoTSTDfG5NfY1bTh08GUnOqlRb+HVhbJ3ODJvsE=",
            "addresses": [
                    {
                        "protocol": "udp4",
                        "address": "roughtime.int08h.com:2002"
                    }
            ]
        },
        {
            "name": "Google-Roughtime",
            "version": "Google-Roughtime",
            "publicKeyType": "ed25519",
            "publicKey": "etPaaIxcBMY1oUeGpwvPMCJMwlRVNxv51KK/tktoJTQ=",
            "addresses": [
                    {
                        "protocol": "udp4",
                        "address": "roughtime.sandbox.google.com:2002"
                    }
            ]
        },
        {
            "name": "Cloudflare-Roughtime-2",
            "version": "IETF-Roughtime",
            "publicKeyType": "ed25519",
            "publicKey": "0GD7c3yP8xEc4Zl2zeuN2SlLvDVVocjsPSL8/Rl/7zg=",
            "addresses": [
                    {
                        "protocol": "udp4",
                        "address": "roughtime.cloudflare.com:2003"
                    }
            ]
        }
    ]
}

@lukevalenta lukevalenta requested a review from cjpatton March 12, 2024 14:56
@lukevalenta lukevalenta merged commit 24a17cf into master Mar 12, 2024
10 checks passed
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.

2 participants