-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracy #2127
base: master
Are you sure you want to change the base?
Tracy #2127
Conversation
[CVarDefs] | ||
public abstract class OpenDreamCVars { | ||
public static readonly CVarDef<string> JsonPath = | ||
CVarDef.Create("opendream.json_path", String.Empty, CVar.SERVERONLY); |
Check notice
Code scanning / InspectCode
Replace built-in type reference with a CLR type name or a keyword in static member access expressions Note
public static readonly CVarDef<int> DebugAdapterLaunched = | ||
CVarDef.Create("opendream.debug_adapter_launched", 0, CVar.SERVERONLY); | ||
|
||
public static readonly CVarDef<bool> SpoofIEUserAgent = |
Check warning
Code scanning / InspectCode
Inconsistent Naming Warning
|
||
public DreamResource(int id, string? filePath, string? resourcePath) { | ||
Id = id; | ||
ResourcePath = resourcePath; | ||
_filePath = filePath; | ||
_tracyMemoryId = Profiler.BeginMemoryZone((ulong)(Unsafe.SizeOf<DreamResource>() + (ResourceData is null? 0 : ResourceData.Length)), "resource"); |
Check notice
Code scanning / InspectCode
Merge conditional ?: expression into conditional access Note
@@ -17,6 +17,9 @@ | |||
namespace OpenDreamRuntime.Objects { | |||
[Virtual] | |||
public class DreamObject { | |||
#if TOOLS | |||
protected ProfilerMemory? _tracyMemoryId; |
Check warning
Code scanning / InspectCode
Inconsistent Naming Warning
@@ -19,16 +20,25 @@ | |||
|
|||
private readonly string? _filePath; | |||
private byte[]? _resourceData; | |||
#if TOOLS | |||
private ProfilerMemory? _tracyMemoryId; |
Check warning
Code scanning / InspectCode
Non-accessed field: Private accessibility Warning
with thanks to https://github.com/wixoaGit/OpenDreamFork/tree/tracy for doing most of the work
When in TOOLS build activates proc logging for DM with source locations.
also it does native procs so we can use it to make OD faster
Memory tracing:
Note: DreamObject memory footprint is not accurate. It assumes that each object allocates its total possible memory.