Skip to main content

A benchmark utility to make requests to a REST API.

Project description

Documentation Status Test Status

pine

A benchmark utility to make requests to a REST API.

Pine makes requests to URLs a bunch of times and computes some statistics about how those requests were responded to. This is ideally useful to run on every change to your codebase so you can identify changes early.

Pine isn’t a load testing tool. If you’re trying to solve C10K, this won’t help you. Pine (currently) runs requests serially.

Documentation

Documentation is available at http://pine.readthedocs.io/en/latest/

Installation

On Python 3.6, pip install pine will do it.

On Python 3.7, there is an additional step required before running the same command. Until PyYAML supports Python 3.7 in a released version, you will need to install PyYAML from GitHub:

pip install git+https://github.com/yaml/pyyaml.git
pip install pine

https://github.com/briancurtin/pine/issues/1 and https://github.com/yaml/pyyaml/issues/126 are tracking this issue.

Usage

pine -c myconfig.yaml is the simplest way to begin. This will run your configuration and output the results to stdout. If you’d like to write the output to a file, -o myoutputfile.json will do it. If you’d like to specify a particular run ID, other than the default of the current timestamp, -i 32a63ab will do it. That’s useful for tracking the commit hash of what you’re testing.

Run pine -h for complete details.

Configuration

Pine uses YAML for configuration. See conf/example.yaml for an example.

Output

Pine writes its results in JSON, either to stdout or the path you specified in -o. It looks like the following:

{"results": [
    {"times": [1.580882219500005, 1.8884545513215, 1.52546876846],
     "timeouts": 0, "failures": [], "name": "get_all_things",
     "description": "Get all of the things",
     "mean": 1.668359371049998,
     "median": 1.580882219500005,
     "stdev": 0.0969358463985873},
    {"times": [0.4894684654656654, 0.508042131499991, 1.054654684684],
     "timeouts": 0, "failures": [], "name": "get_one_thing",
     "description": "Get one thing",
     "mean": 0.856881387399993,
     "median": 0.508042131499991,
     "stdev": 0.0646515285845596},
 ],
 "name": "Testing the things",
 "version": "1.0",
 "id": "7155eb"}

Thanks

Thanks to Francis Horsman for the pine package name.

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

pine-0.8.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

pine-0.8.1-py2.py3-none-any.whl (11.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pine-0.8.1.tar.gz.

File metadata

  • Download URL: pine-0.8.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pine-0.8.1.tar.gz
Algorithm Hash digest
SHA256 bf6a02b07b3b282b30de80c8c4f5a0b54a19dd75d17650bb67d19fea6df32b03
MD5 ab12c09baebaa4b2d6aa81a25df12697
BLAKE2b-256 0d00febe7b58c2c96485372ee8bede46ed8b33ed9c67ec5965311868a7c81d1b

See more details on using hashes here.

Provenance

File details

Details for the file pine-0.8.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pine-0.8.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0b1281bc1a4c104fb4e3e68b07f0d5c014c21bc8c6f79ed94aa710b3f2f5ae9c
MD5 53b450e113ff7358951e038d270a5ace
BLAKE2b-256 3bc339e837a1e9b7178bd26e7c6df2cca29c74aed6991dca04852d4a50bb2ec0

See more details on using hashes here.

Provenance

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