Skip to content

Performance Baseline Tests Performance

github-actions[bot] edited this page Jan 26, 2026 · 2 revisions

Performance Baseline Tests

Auto-generated via PerformanceBaselineTests.GeneratePerformanceBaselineReport. Run the test explicitly to refresh these tables.

These tests serve as automated CI regression guards. They verify that critical operations complete within acceptable time bounds, detecting performance regressions before they reach production.

Baseline Philosophy

Baselines are set generously (2-3x expected typical performance) to account for CI environment variability while still catching significant regressions. A test failure indicates a performance regression that needs investigation.

Test Categories

  • Spatial Trees: QuadTree2D, KdTree2D, KdTree3D, OctTree3D, RTree2D construction and query performance
  • PRNG: Random number generation throughput for PcgRandom, XoroShiroRandom, SplitMix64, RomuDuo
  • Pooling: Collection pool rent/return overhead for List, HashSet, Dictionary, StringBuilder, SystemArrayPool
  • Serialization: JSON and Protobuf serialization/deserialization throughput

Performance Baseline Report

Generated: 2026-01-12 01:36:55 UTC

Spatial Trees

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
QuadTree2DRangeQuery 1K 27 200 13.5% Pass
QuadTree2DBoundsQuery 1K 29 200 14.5% Pass
KdTree2DRangeQuery 1K 27 200 13.5% Pass
KdTree2DNearestNeighbor 1K 32 200 16.0% Pass
RTree2DRangeQuery 1K 2479 200 1239.5% FAIL
OctTree3DRangeQuery 1K 15 200 7.5% Pass
KdTree3DRangeQuery 1K 33 200 16.5% Pass
QuadTree2DConstruction 1 2 500 0.4% Pass
KdTree2DConstruction 1 2 500 0.4% Pass
RTree2DConstruction 1 1 500 0.2% Pass

PRNG

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
PcgRandomNextInt 1M 1 500 0.2% Pass
PcgRandomNextFloat 1M 5 500 1.0% Pass
XoroShiroRandomNextInt 1M 1 500 0.2% Pass
SplitMix64NextInt 1M 1 500 0.2% Pass
RomuDuoNextInt 1M 1 500 0.2% Pass

Pooling

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
ListPooling 100K 239504 200 119752.0% FAIL
HashSetPooling 100K 16503 200 8251.5% FAIL
DictionaryPooling 100K 16997 200 8498.5% FAIL
SystemArrayPool 100K 8 200 4.0% Pass
StringBuilderPooling 100K 16456 200 8228.0% FAIL

Serialization

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
JsonSerialize 10K 43 500 8.6% Pass
JsonDeserialize 10K 64 500 12.8% Pass
JsonRoundTrip 10K 113 1000 11.3% Pass
ProtobufSerialize 10K 1169 500 233.8% FAIL
ProtobufDeserialize 10K 12 500 2.4% Pass
ProtobufRoundTrip 10K 1728 1000 172.8% FAIL

Summary

19 passed, 7 failed out of 26 tests.

Running the Tests

These tests run automatically during CI to catch regressions. To generate fresh benchmark results:

  1. Open Unity Test Runner
  2. Navigate to PerformanceBaselineTests
  3. Run GeneratePerformanceBaselineReport explicitly (it is marked [Explicit])
  4. Results will be output to the console and can be copied to this document

Interpreting Results

  • Time (ms): Actual measured time for the operation
  • Baseline (ms): Maximum allowed time before test failure
  • % of Baseline: How much of the baseline budget was used (lower is better)
  • Status: Pass if within baseline, Fail if exceeded

Clone this wiki locally