branchrust_reboot/main/serverprofiler_codeapicancel

17 Commits over 0 Days - ∞cph!

17 Days Ago
Merge: from main
17 Days Ago
Update: update ServerProfiler.Core bins to Release - built on 2a311df Tests: ran all server profiler unit tests
17 Days Ago
Update: add profile.ImmediateModeEnabled feature flag - codegen + unit test Turns off all managed-side logic for new API Tests: ran unit tests
17 Days Ago
Update: introduce export interval (profile.ExportIntervalS, defaults to 30m) + ability to reset the interval (profile.ResetExportInterval) - codegen and extra unit tests Tests: unit tests
17 Days Ago
Bugfix: ProfileExporter.JSON can now export 0-frame main thread profiles Test: ran previously failing unit tests, checked their exported files - all's gud
17 Days Ago
Update: immediate mode API improvements - debug windows binary built from 2a311dfb - ScopeRecorder automatically exports to json and cleans up recorder state - added RecordScopeIfSlow(..., TimeSpan, ...) API, same as above except exports only if there was a delay - updated unit tests since some scenarios are now impossible Need to fix export next, wrap it with a couple server vars and update to release bins - then it's done Tests: ran most of the unit tests (stress tests skipped as they would overflow with export tasks)
17 Days Ago
Update: ServerProfiler.Core - various improvements and fixes - debug windows binary from f50b4fc9 - change internal constants to be more sensible (assumed worker thread count 4 -> 32, max recorders 64 -> 16, max alloc 1GB -> 512MB) - bugfix for not cleaning up dead thread state when running immediate mode recording - MemoryPool no longer allocates from heap as a fallback when it's over capacity Think core lib is done enough for now, gonna move to finishing rust side Tests: ran unit tests
17 Days Ago
Update: add TextContextExhaustionTest - reduce TestDeferCleanup internal loop count to 8 from 16 (as was still possible to starve the pool) Tests: ran unit tests, pass (got local unsubmitte fixes)
17 Days Ago
Update: add TestDeferCleanup test Works, but discovered that I forgot to clean up threads in ServerProfiler.Core, so I'm starving out the pool Tests: ran new test
17 Days Ago
Update: minor changes - MakeScopeRecording -> RecordScope - fail starting to record if profiler isn't initialized Tests: unit tests
17 Days Ago
Update: ServerProfiler.Core - MemoryReadings are now implemented via MemoryPool - debug windows bins from 47635f61 - ABI break for MemoryData Tests: unit tests + 10x of StressTestImmediateCaptureMT
17 Days Ago
Update: ServerProfiler.Core - use memory pooling - debug windows binary built from af80ca2c - this fixes/reduces occurance of the MT race - also reduces capture overhead (at least in debug, 2.2s -> 0.75ms) - added MPMCQueue license file Need to revive support for MemoryReadings, will do that next. Tests: unit tests + StressTestImmediateCaptureMT 10 times
17 Days Ago
Update: ServerProfiler.Core - replaced my own MPSC queue with a third-party MPMC queue - debug windows binary from 268ce0c3 Needed to add memory pooling, my own version couldn't handle non-integral types Tests: unit tests
20 Days Ago
Update: add StressTestImmediateCaptureMT test It smashes the profiler from all 20 threads doing allocations and calling methods, while main tries to record just 1 method in a loop. This triggers heap corruption - think allocation pooling would solve this. Tests: ran extra unit test - it failed drastically
20 Days Ago
Bugfix: kind-of-fix the thread race with Immediate Mode API (late profiler callback might be in progress as we're releasing resources, leading to invalid write) - built debug binaries from a3312fa9 - Added a mini stress test for main thread only, needs multithreading to fully validate I need to optimize internals a bit, to avoid allocation overhead Tests: ran unit tests on repeat 10 times - no issues
20 Days Ago
Update: first working version of immediate capture API - binaries built from b3a39bd2 commit Has a bug with a race, will fix next Tests: passes unit tests
21 Days Ago
Update: blockout Immediate-Record API - Added unit tests to validate usage Tests: ran unit tests, has expected failures