MCPcopy Create free account
hub / github.com/apache/fory / get_system_info

Function get_system_info

benchmarks/cpp/benchmark_report.py:102–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100
101# === Get system info ===
102def get_system_info():
103 try:
104 info = {
105 "OS": f"{platform.system()} {platform.release()}",
106 "Machine": platform.machine(),
107 "Processor": platform.processor() or "Unknown",
108 }
109 if HAS_PSUTIL:
110 info["CPU Cores (Physical)"] = psutil.cpu_count(logical=False)
111 info["CPU Cores (Logical)"] = psutil.cpu_count(logical=True)
112 info["Total RAM (GB)"] = round(psutil.virtual_memory().total / (1024**3), 2)
113 except Exception as e:
114 info = {"Error gathering system info": str(e)}
115 return info
116
117
118# === Parse benchmark name ===

Callers 1

Calls 1

releaseMethod · 0.45

Tested by

no test coverage detected