Skip to content

[Task]: BenchmarkDotNet suite for CPU side render pipeline performance #17

@rian-be

Description

@rian-be

Summary

Introduce dedicated BenchmarkDotNet suite for measuring the CPU side performance of render pipeline. The benchmark suite should provide repeatable baselines for the parts of rendering that happen before OpenGL/GPU execution: timeline processing, render event translation, render state assembly, scene snapshot generation, visibility planning, and preparation of CPU side data structures used by GPU buffers.

This should make render performance easier to reason about before optimization work starts. Instead of relying on manual FPS observations or full OpenTK window runs, the project should have focused benchmarks that isolate CPU pipeline costs and memory allocations.

Goal

Create repeatable benchmarking setup that measures CPU-side render pipeline performance and memory allocations. The benchmark suite should help identify bottlenecks before data is sent to OpenGL/GPU rendering.

Scope

What should be implemented?

  • Add dedicated benchmark project, e.g. Benchmarks/ChangeTrace.Benchmarks.csproj
  • Add BenchmarkDotNet dependency
  • Add benchmark scenarios for timeline to render state processing
  • Add benchmark scenarios for scene snapshot assembly
  • Add benchmark scenarios for CPU side preparation of GPU buffer data
  • Include datasets of different sizes, e.g. 1k, 10k, 100k events
  • Enable memory allocation diagnostics
  • Add documented way to run benchmarks locally
  • Keep benchmarks separate from normal test/build flow unless explicitly invoked

Acceptance Criteria

  • Benchmarks can be run with single documented command
  • BenchmarkDotNet reports execution time and memory allocations
  • At least one render pipeline benchmark is implemented
  • At least one larger timeline scenario is covered
  • Benchmark project references production code without changing runtime behavior
  • No regression introduced in normal application build
  • Implementation follows current project structure and style

Notes

Start with CPU side render pipeline benchmarks. Real GPU/OpenTK frame benchmarking should be handled separately because results depend heavily on hardware, drivers, VSync, resolution, and windowing environment.

Useful areas to benchmark include RenderFrameAssembler, SceneFrameUpdater, render state assembly, scene snapshot assembly, visibility planning, label planning, and cpu side gpu contract preparation.

Metadata

Metadata

Assignees

Labels

ArchitectureArchitecture-related changes

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions