Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabioz/pyspeedtin
https://github.com/fabioz/pyspeedtin
Last synced: about 17 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/fabioz/pyspeedtin
- Owner: fabioz
- License: mit
- Created: 2015-11-26T12:47:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-03T13:44:07.000Z (almost 9 years ago)
- Last Synced: 2024-10-20T06:12:29.939Z (24 days ago)
- Language: Python
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyspeedtin
API to help in upload benchmark data to https://www.speedtin.com
Common use case:
from pyspeedtin import PySpeedTinApi
api = PySpeedTinApi()
api.add_benchmark('create_10_users')
api.add_benchmark('select_100_users')
commit_id, branch, commit_date = api.git_commit_id_branch_and_date_from_path(__file__)
api.add_measurement(
benchmark_id='create_10_users',
value=1.8,
version='2.2',
released=True,
branch=branch,
commit_id=commit_id,
commit_date=commit_date,
)
api.add_measurement(
benchmark_id='select_100_users',
value=1.9,
version='2.2',
released=True,
branch=branch,
commit_id=commit_id,
commit_date=commit_date,
)
api.commit()Note that each `add_benchmark()/add_measurement()` call will only create a local buffer to save
the contents, and only `api.commit()` will actually post the benchmarks/measurements.Also, all the added benchmarks properly committed will have a local cache saved so that on
subsequent requests trying to add the same benchmark again will not do anything and when a
measurement is committed, it's changed by the id actually required by the REST API.