Skip to content

po3rin/esguard

Repository files navigation

esguard-logo

esguard

esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.

PyPi version PyTest

Quick Start

You need to launch elasticsearch before quick start.

from esguard import ESGuard


@ESGuard(os_cpu_percent=95).decorator
def mock_func(x):
    return x

self.assertEqual(mock_func(1), 1)

Supports

  • os cpu usage
  • os mem usaged percent
  • jvm mem heap used percent
  • os load average 1m
  • os load average 5m
  • os load average 15m

Test

You need to launch elasticsearch before testing.

$ docker compose up -d --build
$ poetry run pytest

About

esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published