Class FenceCostModel
Per-stage cost coefficients used by the fence work-planner to size chunks. Each value scales the corresponding work-hint (migration count, dirty-cluster count, shadow-entry count, spatial-entry count) into a unitless cost figure that the planner bin-packs across workers.
Unit: 1 cost unit ≈ 1 µs of single-worker wall time. Default is calibrated against AntHill traces (migration ≈ 33 µs/entity, AABB recompute ≈ 2.4 µs/cluster). Shadow / Spatial coefficients are placeholders pending measurement. Other workload profiles (shadow-heavy SV writes, sparse spatial) should override these via FenceCostModel; the defaults will load-balance against ratios that don't match your workload, leading to less optimal chunk packing.
public sealed record FenceCostModel : IEquatable<FenceCostModel>
- Inheritance
-
FenceCostModel
- Implements
- Inherited Members
Constructors
FenceCostModel(float, float, float, float)
Per-stage cost coefficients used by the fence work-planner to size chunks. Each value scales the corresponding work-hint (migration count, dirty-cluster count, shadow-entry count, spatial-entry count) into a unitless cost figure that the planner bin-packs across workers.
Unit: 1 cost unit ≈ 1 µs of single-worker wall time. Default is calibrated against AntHill traces (migration ≈ 33 µs/entity, AABB recompute ≈ 2.4 µs/cluster). Shadow / Spatial coefficients are placeholders pending measurement. Other workload profiles (shadow-heavy SV writes, sparse spatial) should override these via FenceCostModel; the defaults will load-balance against ratios that don't match your workload, leading to less optimal chunk packing.
public FenceCostModel(float MigrationCost, float AabbCost, float ShadowCost, float SpatialCost)
Parameters
Fields
Default
Default coefficients, calibrated against AntHill traces: migration ≈ 33.3 µs/entity, AABB recompute ≈ 2.4 µs/cluster. Shadow and Spatial coefficients are placeholders (1.0) pending measurement — override them for shadow-heavy or spatial workloads.
public static readonly FenceCostModel Default
Field Value
Properties
AabbCost
public float AabbCost { get; init; }
Property Value
MigrationCost
public float MigrationCost { get; init; }
Property Value
ShadowCost
public float ShadowCost { get; init; }
Property Value
SpatialCost
public float SpatialCost { get; init; }
Property Value
Methods
Deconstruct(out float, out float, out float, out float)
public void Deconstruct(out float MigrationCost, out float AabbCost, out float ShadowCost, out float SpatialCost)
Parameters
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(FenceCostModel?)
public bool Equals(FenceCostModel? other)
Parameters
otherFenceCostModel
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(FenceCostModel?, FenceCostModel?)
public static bool operator ==(FenceCostModel? left, FenceCostModel? right)
Parameters
leftFenceCostModelrightFenceCostModel
Returns
operator !=(FenceCostModel?, FenceCostModel?)
public static bool operator !=(FenceCostModel? left, FenceCostModel? right)
Parameters
leftFenceCostModelrightFenceCostModel