m
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: 0x020022A9 RID: 8873
|
||||
[Token(Token = "0x20022A9")]
|
||||
public class PerfTesterCameraRenderTimer : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600E18C RID: 57740 RVA: 0x0033FE38 File Offset: 0x0033E038
|
||||
[Token(Token = "0x600E18C")]
|
||||
[Address(RVA = "0x1C0EAA0", Offset = "0x1C0DAA0", VA = "0x181C0EAA0")]
|
||||
private void Awake()
|
||||
{
|
||||
RenderPipelineManager.beginCameraRendering += new Action(this.CDJMNIHFNMK);
|
||||
RenderPipelineManager.endCameraRendering += new Action(this.EMLECMECGOM);
|
||||
}
|
||||
|
||||
// Token: 0x0600E18D RID: 57741 RVA: 0x0033FE68 File Offset: 0x0033E068
|
||||
[Token(Token = "0x600E18D")]
|
||||
[Address(RVA = "0x1C0EB60", Offset = "0x1C0DB60", VA = "0x181C0EB60")]
|
||||
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: 0x0600E18E RID: 57742 RVA: 0x0033FEC8 File Offset: 0x0033E0C8
|
||||
[Token(Token = "0x600E18E")]
|
||||
[Address(RVA = "0x1C0EC00", Offset = "0x1C0DC00", VA = "0x181C0EC00")]
|
||||
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: 0x0600E18F RID: 57743 RVA: 0x0033FFB4 File Offset: 0x0033E1B4
|
||||
[Token(Token = "0x600E18F")]
|
||||
[Address(RVA = "0x1C0EFA0", Offset = "0x1C0DFA0", VA = "0x181C0EFA0")]
|
||||
public void QueueTest()
|
||||
{
|
||||
RenderPipelineManager.beginCameraRendering += new Action(this.CDJMNIHFNMK);
|
||||
RenderPipelineManager.endCameraRendering += new Action(this.EMLECMECGOM);
|
||||
this.StartQueued = true;
|
||||
}
|
||||
|
||||
// Token: 0x0600E190 RID: 57744 RVA: 0x0033FFEC File Offset: 0x0033E1EC
|
||||
[Token(Token = "0x600E190")]
|
||||
[Address(RVA = "0x1C0F060", Offset = "0x1C0E060", VA = "0x181C0F060")]
|
||||
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: 0x0600E191 RID: 57745 RVA: 0x00340038 File Offset: 0x0033E238
|
||||
[Token(Token = "0x600E191")]
|
||||
[Address(RVA = "0x1C0F180", Offset = "0x1C0E180", VA = "0x181C0F180")]
|
||||
public PerfTesterCameraRenderTimer()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04009262 RID: 37474
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4009262")]
|
||||
public Stopwatch RenderStopWatch;
|
||||
|
||||
// Token: 0x04009263 RID: 37475
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4009263")]
|
||||
[JDBPLNPJCPC]
|
||||
public bool StartQueued;
|
||||
|
||||
// Token: 0x04009264 RID: 37476
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x4009264")]
|
||||
[JDBPLNPJCPC]
|
||||
public int FrameStart;
|
||||
|
||||
// Token: 0x04009265 RID: 37477
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4009265")]
|
||||
[JDBPLNPJCPC]
|
||||
public bool Running;
|
||||
|
||||
// Token: 0x04009266 RID: 37478
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4009266")]
|
||||
[SerializeField]
|
||||
private int captureFrameCount = (int)((ulong)100L);
|
||||
|
||||
// Token: 0x04009267 RID: 37479
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4009267")]
|
||||
public int renderCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RecRoom.Utils.Perf
|
||||
{
|
||||
// Token: 0x020022AA RID: 8874
|
||||
[Token(Token = "0x20022AA")]
|
||||
public class PerfTesterPostUpdate : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600E192 RID: 57746 RVA: 0x00340058 File Offset: 0x0033E258
|
||||
[Token(Token = "0x600E192")]
|
||||
[Address(RVA = "0x1C0F190", Offset = "0x1C0E190", VA = "0x181C0F190")]
|
||||
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: 0x0600E193 RID: 57747 RVA: 0x00340148 File Offset: 0x0033E348
|
||||
[Token(Token = "0x600E193")]
|
||||
[Address(RVA = "0x1C0F520", Offset = "0x1C0E520", VA = "0x181C0F520")]
|
||||
public PerfTesterPostUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04009268 RID: 37480
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4009268")]
|
||||
[SerializeField]
|
||||
private PerfTesterPreUpdate preUpdate;
|
||||
|
||||
// Token: 0x04009269 RID: 37481
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4009269")]
|
||||
[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: 0x020022AB RID: 8875
|
||||
[Token(Token = "0x20022AB")]
|
||||
public class PerfTesterPreUpdate : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600E194 RID: 57748 RVA: 0x00340168 File Offset: 0x0033E368
|
||||
[Token(Token = "0x600E194")]
|
||||
[Address(RVA = "0x1C0F530", Offset = "0x1C0E530", VA = "0x181C0F530")]
|
||||
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: 0x0600E195 RID: 57749 RVA: 0x003401C0 File Offset: 0x0033E3C0
|
||||
[Token(Token = "0x600E195")]
|
||||
[Address(RVA = "0x428AD0", Offset = "0x427AD0", VA = "0x180428AD0")]
|
||||
public PerfTesterPreUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400926A RID: 37482
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400926A")]
|
||||
public Stopwatch FrameStopWatch;
|
||||
|
||||
// Token: 0x0400926B RID: 37483
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400926B")]
|
||||
[JDBPLNPJCPC]
|
||||
public int FrameStart;
|
||||
|
||||
// Token: 0x0400926C RID: 37484
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x400926C")]
|
||||
[JDBPLNPJCPC]
|
||||
public bool StartQueued;
|
||||
|
||||
// Token: 0x0400926D RID: 37485
|
||||
[FieldOffset(Offset = "0x25")]
|
||||
[Token(Token = "0x400926D")]
|
||||
[JDBPLNPJCPC]
|
||||
public bool Running;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace RecRoom.Utils.Perf
|
||||
{
|
||||
// Token: 0x020022AC RID: 8876
|
||||
[Token(Token = "0x20022AC")]
|
||||
public class SceneBootTimer : MonoBehaviour
|
||||
{
|
||||
// Token: 0x0600E196 RID: 57750 RVA: 0x003401D4 File Offset: 0x0033E3D4
|
||||
[Token(Token = "0x600E196")]
|
||||
[Address(RVA = "0x1C0F750", Offset = "0x1C0E750", VA = "0x181C0F750")]
|
||||
private IEnumerator Start()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600E196)
|
||||
|
||||
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: 0x0600E197 RID: 57751 RVA: 0x003401F8 File Offset: 0x0033E3F8
|
||||
[Token(Token = "0x600E197")]
|
||||
[Address(RVA = "0x1C0F5C0", Offset = "0x1C0E5C0", VA = "0x181C0F5C0")]
|
||||
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: 0x0600E198 RID: 57752 RVA: 0x0034025C File Offset: 0x0033E45C
|
||||
[Token(Token = "0x600E198")]
|
||||
[Address(RVA = "0x428AD0", Offset = "0x427AD0", VA = "0x180428AD0")]
|
||||
public SceneBootTimer()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400926E RID: 37486
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400926E")]
|
||||
private bool ACJDLBHNHHA;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user