Skip to content

Kou1236/graphics-perf-test-system

Repository files navigation

English | Chinese

Graphics Application Performance Testing System

This repository contains a thesis project prototype for performance testing of local graphics applications. The system treats a local exe as the test target and unifies configuration, execution, sampling, and analysis. For OpenGL applications, it can further capture rendering events and output related metrics such as FPS. The project is still evolving, and future work includes Vulkan / DirectX testing as well as comparative testing across different input scenes.

Overview

The current project has already established the following main workflow:

  • create Application / Scene / Run in the backend
  • launch a local exe and periodically sample CPU / memory / GPU metrics
  • optionally enable OpenGL injection and collect SWAP + DRAW events
  • compute render summaries in the backend and expose query APIs
  • view results in real time through the desktop overlay window

The focus of this project is to build a reproducible performance testing workflow for graphics applications and improve observability of rendering behavior under black-box conditions.

System Workflow

1. General system-level testing workflow

  1. Create an Application
  2. Create a Scene
  3. Start a Run
  4. The backend launches the target process
  5. Metric samples are collected periodically and stored as MetricSample
  6. View the results through the overlay window

Currently available metrics:

  • cpuPct
  • memBytes
  • systemCpuPct
  • systemMemBytes
  • gpuUtilPct
  • gpuMemUsedBytes

2. OpenGL render-level testing workflow

  1. Enable render probe in Scene
  2. The backend injects tp_opengl_hook.dll through injector.exe
  3. The injected module captures SWAP + DRAW events
  4. Events are written to render_events.jsonl
  5. The backend parses the event stream and generates render-summary

Currently implemented render-level metrics:

  • avgFps
  • avgFrameTimeMs
  • frameTimeP95Ms
  • drawCallCount
  • drawCallsPerSecAvg
  • drawCallsPerFrameAvg
  • peakDrawCallsPerFrame

Repository Structure

.
|-- backend/
|   `-- api-service/          # Spring Boot backend
|-- img/
|   `-- test/                 # progress screenshots
|-- opengl-injection/         # OpenGL injection module (C++ / MinHook)
|-- scripts/
|   `-- test/                 # local test programs and helper scripts
|-- tools/
|   `-- osd-overlay/          # Windows overlay tool: PerfOverlay
`-- README.md

Quick Start

Requirements

  • Windows 10/11
  • Java 17
  • Maven or the bundled mvnw
  • Visual Studio Build Tools / x64 Native Tools
  • NVIDIA GPU and nvidia-smi if GPU metrics are required

Notes:

  • General system-level testing does not require OpenGL
  • For non-OpenGL programs, the current implementation generally provides CPU / memory / GPU metrics only

1. Start the backend

cd backend\api-service
mvnw.cmd spring-boot:run

Default address: http://localhost:8080

2. Build the OpenGL injection module

cmake -S opengl-injection -B opengl-injection\build -A x64
cmake --build opengl-injection\build --config Release

3. Run the overlay tool

cd tools\osd-overlay
build-overlay.bat

Then run:

tools\osd-overlay\dist\PerfOverlay.exe

License

This project is licensed under the MIT License. See LICENSE.

About

This repository contains a thesis project prototype for performance testing of local graphics applications. The system treats a local `exe` as the test target and unifies configuration, execution, sampling, and analysis. For OpenGL applications, it can further capture rendering events and output related metrics such as `FPS`.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors