ModernUO/Projects/Server.Tests/Tests/Serialization
Kamron Batman 319dcacba7
feat: anchored-time infrastructure with a save-start anchor in idx v5
WriteAnchoredTime stores the absolute value; ReadAnchoredTime re-bases it
by the elapsed time since the loaded save started, so downtime does not
age it and an unchanged value serializes to identical bytes. Min/MaxValue
pass through unshifted and shifts saturate instead of overflowing. The
shift rides the reader instance, so parallel per-persistence loads and
single-file restores each see their own file's anchor.

World.SaveStartTime is stamped the moment the world freezes for a
snapshot - one anchor for the whole save - and written into the idx v5
header. Loading an idx v5 computes the shift and applies it to that
persistence's bin readers; v4 and older carry no anchor and read with a
zero shift, which existing hand-written-header tests already pin.

Nothing serializes anchored values yet; field conversions follow
separately. Covered by unit round-trip tests and an end-to-end
persistence test that re-bases across a simulated two-hour downtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 15:54:59 -07:00
..
AnchoredTimeTests.cs feat: anchored-time infrastructure with a save-start anchor in idx v5 2026-08-22 15:54:59 -07:00
BufferWriterTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
DecimalSerializationTests.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
EnumConversionTests.cs fix: Fixes spawner timer deserialization, decimal deserialization, and adds potion keg reverse lookup (#1711) 2024-03-28 13:34:12 -07:00
FileBufferWriterTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
GenericEntityPersistenceRoundTripTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
GenericEntityPersistenceTypeTableTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
SerializationChunkSourceTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
SerializationThreadWorkerHandshakeTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
ShadowDictionaryEntriesTests.cs perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
TypeConverterTests.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00