Ejemplo n.º 1
0
 static void StepSingleWorldPrefix(ref HkWorld world, ref ProfilerToken?__localProfilerHandle)
 {
     if (SimulatesParallel)
     {
         return;
     }
     __localProfilerHandle = ProfilerPatch.StartToken(world, MethodIndex, ProfilerCategory.Physics);
 }
Ejemplo n.º 2
0
        static void Prefix(object __instance, MyPacketDataBitStreamBase data, CallSite site, object obj, IMyNetObject sendAs, Vector3D?position, EndpointId source, ref ProfilerToken?__localProfilerHandle)
        {
            if (!MethodIndices.TryGetValue(site.Id, out var methodIndex))
            {
                var methodName = $"{Type.FullName}#OnEvent_{site.MethodInfo.Name}";
                methodIndex = StringIndexer.Instance.IndexOf(methodName);
                MethodIndices.Add(site.Id, methodIndex);
            }

            __localProfilerHandle = ProfilerPatch.StartToken(__instance, methodIndex, Category);
        }
 static void Prefix(object __instance, ref ProfilerToken?__localProfilerHandle)
 {
     __localProfilerHandle = ProfilerPatch.StartToken(__instance, MethodIndex, Category);
 }
 static ProfilerToken?CreateTokenInUpdateReplicationCategory(MySessionComponentBase obj, int methodIndex)
 {
     //Log.Trace($"replication layer: {obj?.GetType()}");
     return(ProfilerPatch.StartToken(obj, methodIndex, ProfilerCategory.UpdateReplication));
 }
Ejemplo n.º 5
0
 static void Prefix(ref ProfilerToken?__localProfilerHandle)
 {
     __localProfilerHandle = ProfilerPatch.StartToken(null, MethodIndex, Category);
 }
Ejemplo n.º 6
0
 static ProfilerToken?StartToken()
 {
     return(ProfilerPatch.StartToken(null, MethodIndex, Category));
 }
 static ProfilerToken?CreateTokenInParallelRun(int methodIndex)
 {
     //Log.Trace($"replication layer: {obj?.GetType()}");
     return(ProfilerPatch.StartToken(null, methodIndex, ProfilerCategory.UpdateParallelRun));
 }
 static ProfilerToken?CreateTokenInParallelWait(int methodIndex)
 {
     //Log.Trace($"session component: {obj?.GetType()}");
     return(ProfilerPatch.StartToken(null, methodIndex, ProfilerCategory.UpdateParallelWait));
 }
Ejemplo n.º 9
0
 static ProfilerToken?StartToken(object obj, int methodIndex)
 {
     return(ProfilerPatch.StartToken(obj, methodIndex, ProfilerCategory.General));
 }