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 11, 2023
1 parent b734b60 commit 6c5d058
Show file tree
Hide file tree
Showing 3 changed files with 619 additions and 1 deletion.
57 changes: 56 additions & 1 deletion lisa/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,32 @@ class PerfMessage(MessageBase):


@dataclass
class DiskPerformanceMessage(PerfMessage):
class SysbenchPerfMessage:
# 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


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


@dataclass
class DiskPerformanceMessage(PerfMessage, SysbenchPerfMessage):
disk_setup_type: DiskSetupType = DiskSetupType.raw
block_size: int = 0
disk_type: DiskType = DiskType.nvme
Expand All @@ -168,6 +193,36 @@ class DiskPerformanceMessage(PerfMessage):
randwrite_iops: Decimal = Decimal(0)
randwrite_lat_usec: Decimal = Decimal(0)

# Sysbench FileIO params
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, SysbenchPerfMessage):
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 6c5d058

Please sign in to comment.