-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplot_constants.py
More file actions
47 lines (39 loc) · 1009 Bytes
/
Copy pathplot_constants.py
File metadata and controls
47 lines (39 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""Dataclass to define a central structure to plot the metrics"""
from dataclasses import dataclass
@dataclass(frozen=True)
class PlotCfg:
"""Dataclass for the plot of the various metrics"""
no_data: str
title: str
x_label: str
y_label: str
ready_label: str | None = None
io_label: str | None = None
legend_label: str | None = None
LATENCY_PLOT = PlotCfg(
no_data="No latency data",
title="Request Latency Distribution",
x_label="Latency (s)",
y_label="Frequency",
)
THROUGHPUT_PLOT = PlotCfg(
no_data="No throughput data",
title="Throughput (RPS)",
x_label="Time (s)",
y_label="Requests/s",
)
SERVER_QUEUES_PLOT = PlotCfg(
no_data="No queue data",
title="Server Queues",
x_label="Time (s)",
y_label="Queue length",
ready_label="Ready queue",
io_label="I/O queue",
)
RAM_PLOT = PlotCfg(
no_data="No RAM data",
title="RAM Usage",
x_label="Time (s)",
y_label="RAM (MB)",
legend_label="RAM",
)