esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.
Project description
esguard
esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.
Quick Start
You need to launch elasticsearch before quick start.
from esguard import ESGuard
@ESGuard(os_cpu_percent=90, os_mem_used_percent=-1, jvm_mem_heap_used_percent=-1).decotator()
def mock_func(x):
return x
self.assertEqual(mock_func(1), 1)
Test
You need to launch elasticsearch before testing.
$ docker-compose up -d --build
$ poetry run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
esguard-0.1.1.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file esguard-0.1.1.tar.gz
.
File metadata
- Download URL: esguard-0.1.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.0 Darwin/18.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74198b0c5a3c715317ef89ff7986b071ee61f716d7422867ebad82e9bc2ca174 |
|
MD5 | 9a15846ed163ebbf521603a07f7ef875 |
|
BLAKE2b-256 | 2e81d9e184addc84d0a926acd8f87d3913b193c9c94ae050ff23b7d41efcd06b |
File details
Details for the file esguard-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: esguard-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.0 Darwin/18.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1481b301c16ad95ada12ed6093e4f4da1c246f17a5e4fd8d050f449d5a007fad |
|
MD5 | cea27c20f3889ba5f2e5189676a9f14c |
|
BLAKE2b-256 | 420b4f1532cdc3452b1243b2eabf32d6d24be8aff7df8fc646c79377105b877b |