Metadata-Version: 2.4
Name: ovperf-runner
Version: 0.1.6
Summary: OV Libraries Performance Testing runner
Author: Aloys Baillet
Author-email: Aloys Baillet <abaillet@nvidia.com>
License-Expression: Apache-2.0
License-File: EXTERNAL-MATERIALS-NOTICE.txt
License-File: LICENSE
License-File: NOTICE
Requires-Dist: numpy>=2.2,<3
Requires-Dist: ovperf-collector>=0.4.0,<0.6
Requires-Dist: ovperf-profile-generator>=0.1.8.dev0,<0.2
Requires-Dist: packaging>=22
Requires-Dist: pytest>=9.0.3,<9.1
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# ovperf-runner

Run pytest performance tests with resource metrics, a JSON report per run and
optional profiler captures.

## Before installation or external downloads

Read this notice before installing dependencies or running workloads that retrieve assets, tools or other external materials.

NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or interacts with external materials. Those retrieved materials are not distributed with this software and are governed solely by separate terms, conditions and licenses. You are solely responsible for finding, reviewing and complying with all applicable terms, conditions, and licenses, and for verifying the security, integrity and suitability of any retrieved materials for your specific use case. This software is provided "AS IS", without warranty of any kind. The author makes no representations or warranties regarding any retrieved materials, and assumes no liability for any losses, damages, liabilities or legal consequences from your use or inability to use this software or any retrieved materials. Use this software and the retrieved materials at your own risk.

## What you can do with it

- Run pytest tests with the `ovperf` command and get a JSON report of each run.
- Measure every test: wall time, CPU, memory and, with an NVIDIA GPU, GPU utilization and memory.
- Record your own metrics and files from a test with the `perf_recorder` fixture.
- Measure the memory used during one named part of a test with the `memory_tracker` fixture.
- Profile a run with Nsight Systems or, on Windows, Superluminal.

## Install

```bash
pip install ovperf-runner
```

- Python 3.10 or later.
- Linux x86-64 and aarch64 with glibc 2.35 or later (for example Ubuntu 22.04)
  and Windows x86-64; with `ovperf-collector` 0.5 or later also macOS 15 or
  later on Apple silicon.
- A plain run needs no other programs. GPU metrics need the NVIDIA driver;
  without it the run continues and records why they are missing.
- Profiler captures need Nsight Systems (Linux or Windows) or Superluminal
  (Windows) on the machine.

## Quick start

A test that uses the two fixtures:

```python
# tests/test_example.py
def test_sort(perf_recorder, memory_tracker):
    data = list(range(1_000_000, 0, -1))
    with memory_tracker.window("sort"):
        data.sort()
    perf_recorder.record_metric("items_sorted", len(data), "count")
```

Run it with `ovperf`; a plain `pytest` run does not have the fixtures:

```bash
ovperf tests/test_example.py
```

The report is written to `ovperf-results/ovperf-report.json`, with a
timestamped copy in the same folder.

## Reference

`docs/reference.md` in the package's source folder describes every command,
option, setting and detail. `CHANGELOG.md` in the same folder lists the changes
in each release. `ovperf --help` lists the options.

## License and contributions

This package is licensed under Apache-2.0. The `LICENSE` and `NOTICE` files in
the distribution hold the license and the NVIDIA attribution notice.

This project is currently not accepting contributions.
