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

Add JSON output support #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add JSON output support #131

wants to merge 2 commits into from

Conversation

rs
Copy link

@rs rs commented May 5, 2018

Example output (whitespace and carriage returns added for readibility):

{
  "Address": "128.199.248.140:443",
  "Header": {
    "Connection": [
      "keep-alive"
    ],
    "Content-Type": [
      "text/html; charset=UTF-8"
    ],
    "Date": [
      "Sat, 05 May 2018 03:15:15 GMT"
    ],
    "Link": [
      "<https://dave.cheney.net/wp-json/>; rel=\"https://api.w.org/\""
    ],
    "Server": [
      "nginx/1.2.1"
    ],
    "Strict-Transport-Security": [
      "max-age=15768000"
    ],
    "X-Powered-By": [
      "PHP/5.4.45-0+deb7u11"
    ]
  },
  "Proto": "HTTP/1.1",
  "Status": "200 OK",
  "Timing": {
    "DNS": 98,
    "TCP": 191,
    "TLS": 604,
    "Server": 747,
    "Transfer": 392,
    "Lookup": 98,
    "Connect": 290,
    "PreTransfer": 895,
    "StartTransfer": 1643,
    "Total": 2036
  }
}

rs added 2 commits April 29, 2018 22:53
To have accurate measurement of TLS and support skipped steps (DNS, TCP
and TLS reuse), the timing code has been refactored to use Go 1.8
support for TLS tracing as well as a more descriptive variable namings
for steps time.

This commit removes support for Go versions lower than 1.8.
Example output (whitespace and carriage returns added for readibility):

    {
      "Address": "128.199.248.140:443",
      "Header": {
        "Connection": [
          "keep-alive"
        ],
        "Content-Type": [
          "text/html; charset=UTF-8"
        ],
        "Date": [
          "Sat, 05 May 2018 03:15:15 GMT"
        ],
        "Link": [
          "<https://dave.cheney.net/wp-json/>; rel=\"https://api.w.org/\""
        ],
        "Server": [
          "nginx/1.2.1"
        ],
        "Strict-Transport-Security": [
          "max-age=15768000"
        ],
        "X-Powered-By": [
          "PHP/5.4.45-0+deb7u11"
        ]
      },
      "Proto": "HTTP/1.1",
      "Status": "200 OK",
      "Timing": {
        "DNS": 98,
        "TCP": 191,
        "TLS": 604,
        "Server": 747,
        "Transfer": 392,
        "Lookup": 98,
        "Connect": 290,
        "PreTransfer": 895,
        "StartTransfer": 1643,
        "Total": 2036
      }
    }
@rs
Copy link
Author

rs commented May 5, 2018

This PR is based on #128

@davecheney
Copy link
Owner

davecheney commented May 7, 2018 via email

@rs
Copy link
Author

rs commented May 7, 2018

As explained in the previous comment, this PR is based on #128. I'm waiting for it to be merged before rebasing on master.

I sent this PR to share a feature I added for my own use. There is no issue associated, it fixes nothing. I can open a separate issue if it's the way you want it.

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