Skip to main content

Hyperfoil python client

Project description

hyperfoil-python-client

This is a python client for Hyperfoil.

Right now it's a wrapper for Hyperfoil's REST API. In the future, I would like to add factories for easier benchmark creation in python.

Usage

from hyperfoil import HyperfoilClient
import yaml

# Initialize client
client = HyperfoilClient('http://hyperfoil_url.com')

# Create new benchmark
with open('tests/benchmarks/hello-world.yaml') as file:
    data = file.read()
data = yaml.load(data, Loader=yaml.loader)
client.benchmark.create(params=data)

# Start benchmark
benchmark_run = client.benchmark.start('benchmark_name')

# Kill benchmark
benchmark_run.kill()

# All stats of run
stats = benchmark_run.all_stats()

# Accessing logs:
logs = client.log()

Run the tests

Before running the tests you need to export the HYPERFOIL_URL environment variable.

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

hyperfoil-client-0.1.8.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

hyperfoil_client-0.1.8-py3-none-any.whl (9.1 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