update dependencies

This commit is contained in:
Henning Jacobs
2023-02-09 22:04:18 +01:00
parent 6876dbe0e0
commit 5f139bbac0
8 changed files with 741 additions and 784 deletions

View File

@@ -6,12 +6,10 @@ def expo(n: int, base=2, factor=1, max_value=None):
Adapted from https://github.com/litl/backoff/blob/master/backoff.py (MIT License)
Args:
----
n: The exponent.
base: The mathematical base of the exponentiation operation
factor: Factor to multiply the exponentation by.
max_value: The maximum value to yield. Once the value in the
:param int n: The exponent.
:param int base: The mathematical base of the exponentiation operation
:param int factor: Factor to multiply the exponentation by.
:param int max_value: The maximum value to yield. Once the value in the
true exponential sequence exceeds this, the value
of max_value will forever after be yielded.
@@ -31,10 +29,8 @@ def random_jitter(value, jitter=1):
This adds up to 1 second of additional time to the original value.
Prior to backoff version 1.2 this was the default jitter behavior.
Args:
----
value: The unadulterated backoff value.
jitter: Jitter amount.
:param float value: The unadulterated backoff value.
:param float jitter: Jitter amount.
"""
return value + random.uniform(0, jitter)
@@ -49,9 +45,7 @@ def full_jitter(value):
AWS blog's post on the performance of various jitter algorithms.
(http://www.awsarchitectureblog.com/2015/03/backoff.html)
Args:
----
value: The unadulterated backoff value.
:param float value: The unadulterated backoff value.
"""
return random.uniform(0, value)

View File

@@ -18,7 +18,6 @@ session = requests.Session()
# https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/resource-metrics-api.md
class NodeMetrics(APIObject):
version = "metrics.k8s.io/v1beta1"
endpoint = "nodes"
kind = "NodeMetrics"
@@ -26,7 +25,6 @@ class NodeMetrics(APIObject):
# https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/resource-metrics-api.md
class PodMetrics(NamespacedAPIObject):
version = "metrics.k8s.io/v1beta1"
endpoint = "pods"
kind = "PodMetrics"