Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/navid2zp/tractus
Trace HTTP requests and gather performance metrics.
https://github.com/navid2zp/tractus
benchmarking network python trace tracer
Last synced: about 6 hours ago
JSON representation
Trace HTTP requests and gather performance metrics.
- Host: GitHub
- URL: https://github.com/navid2zp/tractus
- Owner: Navid2zp
- License: mit
- Created: 2021-02-04T21:04:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-08T22:24:20.000Z (over 3 years ago)
- Last Synced: 2024-11-07T19:23:37.183Z (12 days ago)
- Topics: benchmarking, network, python, trace, tracer
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tractus
Trace HTTP requests and gather performance metrics.
### Install
```
pip install tractus
```### Usage
```python
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} ms')
print(f'Handshake time: {result.handshake} ms')
print(f'First byte time: {result.first_byte} ms')
print(f'Full body time: {result.full_data} ms')
print(f'Body length: {result.data_length} bytes')
print(f'Headers length: {result.headers_length} bytes')```
#### Helpers:
```python
# Get result as json
result.as_json()
# Get result as dict
result.as_dict()
```License
----
MIT#### Name
https://en.wiktionary.org/wiki/tractus