Skip to content

Commit

Permalink
Create Sysbench tool
Browse files Browse the repository at this point in the history
This commit has changes to add sysbench as tool to lisa
This is needed for CPU/Memory/Fileio perf test using
sysbench tool.

Signed-off-by: Smit Gardhariya <[email protected]>
  • Loading branch information
smit-gardhariya committed Dec 6, 2023
1 parent 1c5b564 commit 739a5e9
Show file tree
Hide file tree
Showing 3 changed files with 537 additions and 0 deletions.
54 changes: 54 additions & 0 deletions lisa/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,22 @@ class PerfMessage(MessageBase):
role: str = ""
test_result_id: str = ""

# Sysbench common params
min_latency_ms: float = 0.00
max_latency_ms: float = 0.00
avg_latency_ms: float = 0.00
percentile_95_latency_ms: float = 0.00
sum_latency_ms: float = 0.00
total_time: float = 0.00
events_avg: float = 0.00
events_stddev: float = 0.00
execution_time_avg: float = 0.00
execution_time_stddev: float = 0.00
total_events: Decimal = Decimal(0)
threads: int = 0
events: int = 0
time_limit_sec: int = 0


T = TypeVar("T", bound=PerfMessage)

Expand All @@ -149,6 +165,12 @@ class PerfMessage(MessageBase):
)


@dataclass
class CPUPerformanceMessage(PerfMessage):
cpu_max_prime: Decimal = Decimal(0)
cpu_speed: Decimal = Decimal(0)


@dataclass
class DiskPerformanceMessage(PerfMessage):
disk_setup_type: DiskSetupType = DiskSetupType.raw
Expand All @@ -168,6 +190,38 @@ class DiskPerformanceMessage(PerfMessage):
randwrite_iops: Decimal = Decimal(0)
randwrite_lat_usec: Decimal = Decimal(0)

# Sysbench FileIO params
read_io_per_sec: Decimal = Decimal(0)
write_io_per_sec: Decimal = Decimal(0)
read_mib_per_sec: Decimal = Decimal(0)
write_mib_per_sec: Decimal = Decimal(0)
fsyncs_per_sec: Decimal = Decimal(0)
file_fsync_all: str = ""
file_fsync_end: str = ""
total_file: int = 0
file_total_size_in_gb: int = 0
file_async_backlog: int = 0
file_fsync_freq: int = 0
file_merged_requests: int = 0
file_rw_ratio: float = 0
file_ops: str = ""
file_io_mode: str = ""
file_fsync_mode: str = ""


@dataclass
class MemoryPerformanceMessage(PerfMessage):
total_operations: Decimal = Decimal(0)
total_mib_transferred: int = 0
block_size_in_kb: int = 0
memory_total_size_in_gb: int = 0
mib_per_second: float = 0.0
operations_per_second: float = 0
scope: str = ""
hugetlb_on: bool = False
access_mode: str = ""
operation: str = ""


@dataclass
class NetworkLatencyPerformanceMessage(PerfMessage):
Expand Down
2 changes: 2 additions & 0 deletions lisa/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
from .strace import Strace
from .stress_ng import StressNg
from .swap import Swap
from .sysbench import Sysbench
from .sysctl import Sysctl
from .systemd_analyze import SystemdAnalyze
from .tar import Tar
Expand Down Expand Up @@ -225,6 +226,7 @@
"Strace",
"StressNg",
"Swap",
"Sysbench",
"Sysctl",
"SystemdAnalyze",
"Tar",
Expand Down
Loading

0 comments on commit 739a5e9

Please sign in to comment.