-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempts to fix replay recording performance issues.
Replays now use a dedicated thread (rather than thread pool) for write operations. Moved batch operations to this thread as well. They were previously happening during PVS. Looking at some trace files these compression ops can easily take 5+ ms in some cases, so moving them somewhere else is appreciated. Added EventSource instrumentation for PVS and replay recording.
- Loading branch information
Showing
5 changed files
with
173 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Robust.Shared/Replays/SharedReplayRecordingManager.Events.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Diagnostics.Tracing; | ||
|
||
namespace Robust.Shared.Replays; | ||
|
||
internal abstract partial class SharedReplayRecordingManager | ||
{ | ||
[EventSource(Name = "Robust.ReplayRecording")] | ||
public sealed class RecordingEventSource : EventSource | ||
{ | ||
public static RecordingEventSource Log { get; } = new(); | ||
|
||
[Event(1)] | ||
public void WriteTaskStart(int task) => WriteEvent(1, task); | ||
|
||
[Event(2)] | ||
public void WriteTaskStop(int task) => WriteEvent(2, task); | ||
|
||
[Event(3)] | ||
public void WriteBatchStart(int index) => WriteEvent(3, index); | ||
|
||
[Event(4)] | ||
public void WriteBatchStop(int index, int uncompressed, int compressed) => | ||
WriteEvent(4, index, uncompressed, compressed); | ||
|
||
[Event(5)] | ||
public void WriteQueueBlocked() => WriteEvent(5); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters