Skip to main content

Trace a HTTP request and gather the performance metrics.

Project description

tractus

Trace HTTP requests and gather performance metrics.

Install

pip install tractus

Usage

from tractus import Tracer

result = Tracer('https://google.com').trace()

print(f'Host IP: {result.ip}')
print(f'Status code: {result.status_code}')
print(f'DNS time: {result.dns:.2f} ms')
print(f'Handshake time: {result.handshake:.2f} ms')
print(f'First byte time: {result.first_byte:.2f} ms')
print(f'Full body time: {result.full_data:.2f} ms')
print(f'Body length: {result.data_length} bytes')
print(f'Headers length: {result.headers_length} bytes')

License

MIT

Name

https://en.wiktionary.org/wiki/tractus

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tractus-0.5.2.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

tractus-0.5.2-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page