mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
bench
This commit is contained in:
@@ -36,6 +36,7 @@ class ReportGenerator:
|
||||
def generate_benchmark_table_header(benchmark_group_result: BenchmarkGroupResult) -> Panel:
|
||||
header_text = Text(f"TYPE: {benchmark_group_result.type_.upper()} ; "
|
||||
f"ITERATIONS: {benchmark_group_result.iterations} ; "
|
||||
f"GC {"DISABLED" if benchmark_group_result.is_gc_disabled else "ENABLED"} ; "
|
||||
f"ALL TIME IN MS",
|
||||
style="bold magenta")
|
||||
return Panel(header_text, expand=False, border_style="magenta")
|
||||
@@ -55,8 +56,6 @@ class ReportGenerator:
|
||||
table.add_row("CPU Physical Cores", str(self.system_info.cpu_info.physical_cores))
|
||||
table.add_row("CPU Logical Cores", str(self.system_info.cpu_info.logical_cores))
|
||||
table.add_row("CPU Max Frequency", str(self.system_info.cpu_info.max_frequency) + ' GHz')
|
||||
table.add_row("CPU Min Frequency", str(self.system_info.cpu_info.min_frequency) + ' GHz')
|
||||
table.add_row("CPU Current Frequency", str(self.system_info.cpu_info.current_frequency) + ' GHz')
|
||||
table.add_row("Total RAM", str(self.system_info.memory_info.total_ram) + ' GB')
|
||||
table.add_row("Used RAM", str(self.system_info.memory_info.used_ram) + ' GB')
|
||||
table.add_row("Available RAM", str(self.system_info.memory_info.available_ram) + ' GB')
|
||||
|
||||
@@ -30,8 +30,6 @@ class CPUInfo:
|
||||
physical_cores: int
|
||||
logical_cores: int
|
||||
max_frequency: float
|
||||
min_frequency: float
|
||||
current_frequency: float
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class MemoryInfo:
|
||||
@@ -93,8 +91,6 @@ def get_cpu_info() -> CPUInfo:
|
||||
cpu_logical_cores = psutil.cpu_count(logical=True)
|
||||
|
||||
cpu_freq = psutil.cpu_freq() or "N/A"
|
||||
cpu_current_frequency = cpu_freq.current
|
||||
cpu_min_frequency = cpu_freq.min
|
||||
cpu_max_frequency = cpu_freq.max
|
||||
|
||||
return CPUInfo(
|
||||
@@ -102,8 +98,6 @@ def get_cpu_info() -> CPUInfo:
|
||||
architecture=cpu_architecture,
|
||||
physical_cores=cpu_physical_cores,
|
||||
logical_cores=cpu_logical_cores,
|
||||
current_frequency=cpu_current_frequency,
|
||||
min_frequency=cpu_min_frequency,
|
||||
max_frequency=cpu_max_frequency
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user