Objects which holds the start time, end time and query URL.
Definition at line 40 of file prometheus.py.
◆ __init__()
def performance.prometheus.Prometheus.__init__ |
( |
|
self, |
|
|
str |
url, |
|
|
str |
start, |
|
|
str |
end |
|
) |
| |
◆ _fetch_by_query()
Dict[str, Any] performance.prometheus.Prometheus._fetch_by_query |
( |
|
self, |
|
|
str |
query |
|
) |
| |
|
private |
Fetches the given query with time range.
Fetch the given query within a time range. The pulling
interval is every 5s, the actual data from the query is
a time series.
Definition at line 53 of file prometheus.py.
◆ _fetch_cpu_for_pod()
Dict[str, List[float]] performance.prometheus.Prometheus._fetch_cpu_for_pod |
( |
|
self, |
|
|
str |
container_matcher, |
|
|
str |
pod_name |
|
) |
| |
|
private |
Fetches the cpu data for each pod.
Fetch total cpu seconds during the time range specified in the Prometheus instance
for a pod. After obtain the cpu seconds, the data are trimmed from time series to
a data list and saved in the Dict that keyed by the container names.
Args:
container_matcher: A string consist one or more container name separated by |.
Definition at line 72 of file prometheus.py.
◆ _fetch_memory_for_pod()
Dict[str, List[float]] performance.prometheus.Prometheus._fetch_memory_for_pod |
( |
|
self, |
|
|
str |
container_matcher, |
|
|
str |
pod_name |
|
) |
| |
|
private |
Fetches memory data for each pod.
Fetch total memory data during the time range specified in the Prometheus instance
for a pod. After obtain the memory data, the data are trimmed from time series to
a data list and saved in the Dict that keyed by the container names.
Args:
container_matcher: A string consist one or more container name separated by |.
Definition at line 93 of file prometheus.py.
◆ fetch_cpu_and_memory_data()
Dict[str, Any] performance.prometheus.Prometheus.fetch_cpu_and_memory_data |
( |
|
self, |
|
|
List[str] |
container_list, |
|
|
Dict[str, List[str]] |
pod_dict |
|
) |
| |
Fetch total cpu seconds and memory data for multiple pods.
Args:
container_list: A list of container names to fetch the data for.
pod_dict: the pods to fetch data for, the pod_dict is keyed by
role of the pod: clients, driver and servers. The values
for the pod_dict are the list of pod names that consist
the same role specified in the key.
Definition at line 117 of file prometheus.py.
◆ end
performance.prometheus.Prometheus.end |
◆ start
performance.prometheus.Prometheus.start |
◆ url
performance.prometheus.Prometheus.url |
The documentation for this class was generated from the following file: