Skip to main content

A benchmark utility to make requests to a REST API.

Project description

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

Under normal circumstances you would just do pip install pine.

However, until PyYAML supports Python 3.7 in a released version, pip needs one extra argument so we can install PyYAML from GitHub:

pip install --process-dependency-links 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": [
    {"timeouts": 0, "failures": [], "name": "get_all_things",
     "description": "Get all of the things", "version": "1.0",
     "mean": 1.668359371049998,
     "median": 1.580882219500005,
     "stdev": 0.0969358463985873},
    {"timeouts": 0, "failures": [], "name": "get_one_thing",
     "description": "Get one thing", "version": "1.0",
     "mean": 0.856881387399993,
     "median": 0.508042131499991,
     "stdev": 0.0646515285845596},
 ],
 "id": "7155eb"}

Requirements

Pine uses aiohttp on Python 3.7.

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.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

pine-0.3-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for pine-0.3.tar.gz
Algorithm Hash digest
SHA256 2273930e70fe0f14150dd8414b67327d5ce358b59e37b73cfa16e6d48e83535d
MD5 36c3d5bf82e372d09ee7673a3f0200f0
BLAKE2b-256 20a03fe595b30555bb5237687e510db68a09e4d8a9bdedf9278a69f04c0e599a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pine-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 aa6a559b8d3687eff33c2002eaf6133ebafb8d1af70a33d18926c3110b8305b5
MD5 22f46f6b59460d8305739b89fd482b75
BLAKE2b-256 55385bb73c704551d21d598e4388a47c6985dfe414ccc7e710b9f1a446176745

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