Skip to content

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
QuadTree2DRangeQuery1K2720013.5%Pass
QuadTree2DBoundsQuery1K2920014.5%Pass
KdTree2DRangeQuery1K2720013.5%Pass
KdTree2DNearestNeighbor1K3220016.0%Pass
RTree2DRangeQuery1K24792001239.5%FAIL
OctTree3DRangeQuery1K152007.5%Pass
KdTree3DRangeQuery1K3320016.5%Pass
QuadTree2DConstruction125000.4%Pass
KdTree2DConstruction125000.4%Pass
RTree2DConstruction115000.2%Pass

PRNG

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
PcgRandomNextInt1M15000.2%Pass
PcgRandomNextFloat1M55001.0%Pass
XoroShiroRandomNextInt1M15000.2%Pass
SplitMix64NextInt1M15000.2%Pass
RomuDuoNextInt1M15000.2%Pass

Pooling

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
ListPooling100K239504200119752.0%FAIL
HashSetPooling100K165032008251.5%FAIL
DictionaryPooling100K169972008498.5%FAIL
SystemArrayPool100K82004.0%Pass
StringBuilderPooling100K164562008228.0%FAIL

Serialization

Test Iterations Time (ms) Baseline (ms) % of Baseline Status
JsonSerialize10K435008.6%Pass
JsonDeserialize10K6450012.8%Pass
JsonRoundTrip10K113100011.3%Pass
ProtobufSerialize10K1169500233.8%FAIL
ProtobufDeserialize10K125002.4%Pass
ProtobufRoundTrip10K17281000172.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