oh dear
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace RecRoom.Utils.Perf
|
||||
{
|
||||
// Token: 0x020021C5 RID: 8645
|
||||
[Token(Token = "0x20021C5")]
|
||||
public class PerfTesterCameraRenderTimer : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600DD80 RID: 56704 RVA: 0x00336954 File Offset: 0x00334B54
|
||||
[Token(Token = "0x600DD80")]
|
||||
[Address(RVA = "0x1106530", Offset = "0x1105330", VA = "0x181106530")]
|
||||
private void Awake()
|
||||
{
|
||||
RenderPipelineManager.beginCameraRendering += new Action(this.CDJMNIHFNMK);
|
||||
RenderPipelineManager.endCameraRendering += new Action(this.EMLECMECGOM);
|
||||
}
|
||||
|
||||
// Token: 0x0600DD81 RID: 56705 RVA: 0x00336984 File Offset: 0x00334B84
|
||||
[Token(Token = "0x600DD81")]
|
||||
[Address(RVA = "0x11065F0", Offset = "0x11053F0", VA = "0x1811065F0")]
|
||||
private void CDJMNIHFNMK(ScriptableRenderContext LHOMKMINCHH, Camera FOMHGMLPOND)
|
||||
{
|
||||
if (!this.StartQueued)
|
||||
{
|
||||
if (this.Running)
|
||||
{
|
||||
this.RenderStopWatch.Start();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.StartQueued = false;
|
||||
this.Running = true;
|
||||
int frameCount = Time.frameCount;
|
||||
this.FrameStart = frameCount;
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
this.RenderStopWatch = stopwatch;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600DD82 RID: 56706 RVA: 0x003369E4 File Offset: 0x00334BE4
|
||||
[Token(Token = "0x600DD82")]
|
||||
[Address(RVA = "0x1106690", Offset = "0x1105490", VA = "0x181106690")]
|
||||
private void EMLECMECGOM(ScriptableRenderContext LHOMKMINCHH, Camera FOMHGMLPOND)
|
||||
{
|
||||
if (this.Running && !this.Running)
|
||||
{
|
||||
this.RenderStopWatch.Stop();
|
||||
int frameCount = Time.frameCount;
|
||||
TimeSpan elapsed = this.RenderStopWatch.Elapsed;
|
||||
object[] array = new object[4];
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
array[0] = array;
|
||||
if (" Frames: " != 0)
|
||||
{
|
||||
}
|
||||
array[1] = " Frames: ";
|
||||
string text;
|
||||
if (text != 0)
|
||||
{
|
||||
}
|
||||
array[2] = text;
|
||||
if ("ms" != 0)
|
||||
{
|
||||
}
|
||||
array[3] = "ms";
|
||||
global::UnityEngine.Debug.Log(string.Concat(array));
|
||||
bool isHighResolution = Stopwatch.IsHighResolution;
|
||||
string text2;
|
||||
global::UnityEngine.Debug.Log("High Res: " + text2);
|
||||
this.Running = false;
|
||||
RenderPipelineManager.beginCameraRendering -= new Action(this.CDJMNIHFNMK);
|
||||
RenderPipelineManager.endCameraRendering -= new Action(this.EMLECMECGOM);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600DD83 RID: 56707 RVA: 0x00336AD0 File Offset: 0x00334CD0
|
||||
[Token(Token = "0x600DD83")]
|
||||
[Address(RVA = "0x1106A30", Offset = "0x1105830", VA = "0x181106A30")]
|
||||
public void QueueTest()
|
||||
{
|
||||
RenderPipelineManager.beginCameraRendering += new Action(this.CDJMNIHFNMK);
|
||||
RenderPipelineManager.endCameraRendering += new Action(this.EMLECMECGOM);
|
||||
this.StartQueued = true;
|
||||
}
|
||||
|
||||
// Token: 0x0600DD84 RID: 56708 RVA: 0x00336B08 File Offset: 0x00334D08
|
||||
[Token(Token = "0x600DD84")]
|
||||
[Address(RVA = "0x1106AF0", Offset = "0x11058F0", VA = "0x181106AF0")]
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDownInt(KeyCode.Alpha9))
|
||||
{
|
||||
global::UnityEngine.Debug.Log("Queueing Render Capture");
|
||||
RenderPipelineManager.beginCameraRendering += new Action(this.CDJMNIHFNMK);
|
||||
RenderPipelineManager.endCameraRendering += new Action(this.EMLECMECGOM);
|
||||
this.StartQueued = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600DD85 RID: 56709 RVA: 0x00336B54 File Offset: 0x00334D54
|
||||
[Token(Token = "0x600DD85")]
|
||||
[Address(RVA = "0x1106C10", Offset = "0x1105A10", VA = "0x181106C10")]
|
||||
public PerfTesterCameraRenderTimer()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400908F RID: 37007
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400908F")]
|
||||
public Stopwatch RenderStopWatch;
|
||||
|
||||
// Token: 0x04009090 RID: 37008
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4009090")]
|
||||
[INPFBLGGAJF]
|
||||
public bool StartQueued;
|
||||
|
||||
// Token: 0x04009091 RID: 37009
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x4009091")]
|
||||
[INPFBLGGAJF]
|
||||
public int FrameStart;
|
||||
|
||||
// Token: 0x04009092 RID: 37010
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4009092")]
|
||||
[INPFBLGGAJF]
|
||||
public bool Running;
|
||||
|
||||
// Token: 0x04009093 RID: 37011
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4009093")]
|
||||
[SerializeField]
|
||||
private int captureFrameCount = (int)((ulong)100L);
|
||||
|
||||
// Token: 0x04009094 RID: 37012
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4009094")]
|
||||
public int renderCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RecRoom.Utils.Perf
|
||||
{
|
||||
// Token: 0x020021C6 RID: 8646
|
||||
[Token(Token = "0x20021C6")]
|
||||
public class PerfTesterPostUpdate : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600DD86 RID: 56710 RVA: 0x00336B74 File Offset: 0x00334D74
|
||||
[Token(Token = "0x600DD86")]
|
||||
[Address(RVA = "0x1106C20", Offset = "0x1105A20", VA = "0x181106C20")]
|
||||
private void Update()
|
||||
{
|
||||
PerfTesterPreUpdate perfTesterPreUpdate = this.preUpdate;
|
||||
if (perfTesterPreUpdate.Running)
|
||||
{
|
||||
perfTesterPreUpdate.FrameStopWatch.Stop();
|
||||
int frameCount = Time.frameCount;
|
||||
TimeSpan elapsed = this.preUpdate.FrameStopWatch.Elapsed;
|
||||
object[] array = new object[4];
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
array[0] = array;
|
||||
if (" Frames: " != 0)
|
||||
{
|
||||
}
|
||||
array[1] = " Frames: ";
|
||||
string text;
|
||||
if (text != 0)
|
||||
{
|
||||
}
|
||||
array[2] = text;
|
||||
if ("ms" != 0)
|
||||
{
|
||||
}
|
||||
array[3] = "ms";
|
||||
global::UnityEngine.Debug.Log(string.Concat(array));
|
||||
bool isHighResolution = Stopwatch.IsHighResolution;
|
||||
string text2;
|
||||
global::UnityEngine.Debug.Log("High Res: " + text2);
|
||||
this.preUpdate.Running = false;
|
||||
}
|
||||
if (Input.GetKeyDownInt(KeyCode.Alpha0))
|
||||
{
|
||||
global::UnityEngine.Debug.Log("Queueing Capture");
|
||||
this.preUpdate.StartQueued = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600DD87 RID: 56711 RVA: 0x00336C64 File Offset: 0x00334E64
|
||||
[Token(Token = "0x600DD87")]
|
||||
[Address(RVA = "0x1106FB0", Offset = "0x1105DB0", VA = "0x181106FB0")]
|
||||
public PerfTesterPostUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04009095 RID: 37013
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4009095")]
|
||||
[SerializeField]
|
||||
private PerfTesterPreUpdate preUpdate;
|
||||
|
||||
// Token: 0x04009096 RID: 37014
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4009096")]
|
||||
[SerializeField]
|
||||
private int captureFrameCount = (int)((ulong)100L);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RecRoom.Utils.Perf
|
||||
{
|
||||
// Token: 0x020021C7 RID: 8647
|
||||
[Token(Token = "0x20021C7")]
|
||||
public class PerfTesterPreUpdate : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600DD88 RID: 56712 RVA: 0x00336C84 File Offset: 0x00334E84
|
||||
[Token(Token = "0x600DD88")]
|
||||
[Address(RVA = "0x1106FC0", Offset = "0x1105DC0", VA = "0x181106FC0")]
|
||||
private void Update()
|
||||
{
|
||||
if (!this.StartQueued)
|
||||
{
|
||||
if (this.Running)
|
||||
{
|
||||
this.FrameStopWatch.Start();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.StartQueued = false;
|
||||
int frameCount = Time.frameCount;
|
||||
this.FrameStart = frameCount;
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
this.FrameStopWatch = stopwatch;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600DD89 RID: 56713 RVA: 0x00336CDC File Offset: 0x00334EDC
|
||||
[Token(Token = "0x600DD89")]
|
||||
[Address(RVA = "0x74EA40", Offset = "0x74D840", VA = "0x18074EA40")]
|
||||
public PerfTesterPreUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04009097 RID: 37015
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4009097")]
|
||||
public Stopwatch FrameStopWatch;
|
||||
|
||||
// Token: 0x04009098 RID: 37016
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4009098")]
|
||||
[INPFBLGGAJF]
|
||||
public int FrameStart;
|
||||
|
||||
// Token: 0x04009099 RID: 37017
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x4009099")]
|
||||
[INPFBLGGAJF]
|
||||
public bool StartQueued;
|
||||
|
||||
// Token: 0x0400909A RID: 37018
|
||||
[FieldOffset(Offset = "0x25")]
|
||||
[Token(Token = "0x400909A")]
|
||||
[INPFBLGGAJF]
|
||||
public bool Running;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace RecRoom.Utils.Perf
|
||||
{
|
||||
// Token: 0x020021C8 RID: 8648
|
||||
[Token(Token = "0x20021C8")]
|
||||
public class SceneBootTimer : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600DD8A RID: 56714 RVA: 0x00336CF0 File Offset: 0x00334EF0
|
||||
[Token(Token = "0x600DD8A")]
|
||||
[Address(RVA = "0x110C170", Offset = "0x110AF70", VA = "0x18110C170")]
|
||||
private IEnumerator Start()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600DD8A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator RecRoom.Utils.Perf.SceneBootTimer::Start()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
call:void(BGEJAIICNIM::System.IDisposable.Dispose, ldloc:BGEJAIICNIM(var_0))
|
||||
stfld:int32(BGEJAIICNIM::<>1__state, ldloc:BGEJAIICNIM(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
||||
stfld:SceneBootTimer(BGEJAIICNIM::<>4__this, ldloc:BGEJAIICNIM(var_0), ldloc:SceneBootTimer(this))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600DD8B RID: 56715 RVA: 0x00336D14 File Offset: 0x00334F14
|
||||
[Token(Token = "0x600DD8B")]
|
||||
[Address(RVA = "0x110BFE0", Offset = "0x110ADE0", VA = "0x18110BFE0")]
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (!this.ACJDLBHNHHA)
|
||||
{
|
||||
object[] array = new object[2];
|
||||
Scene activeScene = SceneManager.GetActiveScene();
|
||||
string text;
|
||||
if (text != 0)
|
||||
{
|
||||
}
|
||||
array[0] = text;
|
||||
float realtimeSinceStartup = Time.realtimeSinceStartup;
|
||||
if (text != 0)
|
||||
{
|
||||
}
|
||||
array[1] = text;
|
||||
Debug.LogWarningFormat("{0} destroyed in {1:F3}sec.", array);
|
||||
this.ACJDLBHNHHA = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600DD8C RID: 56716 RVA: 0x00336D78 File Offset: 0x00334F78
|
||||
[Token(Token = "0x600DD8C")]
|
||||
[Address(RVA = "0x74EA40", Offset = "0x74D840", VA = "0x18074EA40")]
|
||||
public SceneBootTimer()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400909B RID: 37019
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400909B")]
|
||||
private bool ACJDLBHNHHA;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user