File: conftest.py

package info (click to toggle)
markdown-it-py 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,780 kB
  • sloc: python: 5,214; xml: 39; sh: 29; makefile: 24
file content (12 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
def pytest_benchmark_update_machine_info(config, machine_info):
    import psutil

    freq = psutil.cpu_freq()
    machine_info["psutil"] = {
        "cpu_count": psutil.cpu_count(logical=False),
        "cpu_count_logical": psutil.cpu_count(logical=True),
        "cpu_percent": psutil.cpu_percent(),
        "cpu_freq_min": freq.min,
        "cpu_freq_max": freq.max,
        "cpu_freq_current": freq.current,
    }