From 0eb2fe63ecf297b769c3326413e8ab005daf9e05 Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Wed, 25 Sep 2024 18:52:11 +0100 Subject: [PATCH 1/2] Fix speling --- .github/workflows/build.yml | 2 +- Assets/Scripts/SketchControlsScript.cs | 4 ++-- Assets/Scripts/UserConfig.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fd83a93fe..4901fd1e95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,7 +136,7 @@ jobs: env: PRERELEASE: ${{ steps.version.outputs.prerelease }} run: | - # For a PR action (i.e., syncronize / open), the value of github.ref will be refs/pull/1234/merge + # For a PR action (i.e., synchronize / open), the value of github.ref will be refs/pull/1234/merge # For a push action, it will be either refs/heads/foo_branch_name OR refs/tags/v1234. # We want to use the base name for pushes of tags or to main, the PR number for PRs, and the branch name for named branches. if [[ "$PRERELEASE" == "false" || ${{ github.ref }} == refs/heads/main ]] diff --git a/Assets/Scripts/SketchControlsScript.cs b/Assets/Scripts/SketchControlsScript.cs index 294099a135..4577277bec 100644 --- a/Assets/Scripts/SketchControlsScript.cs +++ b/Assets/Scripts/SketchControlsScript.cs @@ -5105,7 +5105,7 @@ private void ToggleProfiling() } else { - ProfilingManager.Instance.StartProfiling(App.UserConfig.Profiling.ProflingMode); + ProfilingManager.Instance.StartProfiling(App.UserConfig.Profiling.ProfilingMode); } } @@ -5142,7 +5142,7 @@ private IEnumerator DoProfiling(bool andQuit = false) InputManager.Wand.Geometry.transform.rotation = Camera.main.transform.rotation; m_PanelManager.LockPanelsToController(); - ProfilingManager.Instance.StartProfiling(App.UserConfig.Profiling.ProflingMode); + ProfilingManager.Instance.StartProfiling(App.UserConfig.Profiling.ProfilingMode); yield return new WaitForSeconds(App.UserConfig.Profiling.Duration); ProfilingManager.Instance.StopProfiling(); diff --git a/Assets/Scripts/UserConfig.cs b/Assets/Scripts/UserConfig.cs index b789dbe44a..313c82fdc6 100644 --- a/Assets/Scripts/UserConfig.cs +++ b/Assets/Scripts/UserConfig.cs @@ -601,7 +601,7 @@ public struct ProfilingConfig { public const int kDefaultScreenshotResolution = 1000; public string[] ProfilingFunctions { get; private set; } - public ProfilingManager.Mode ProflingMode { get; private set; } + public ProfilingManager.Mode ProfilingMode { get; private set; } public string Mode { @@ -609,7 +609,7 @@ public string Mode { try { - ProflingMode = (ProfilingManager.Mode)Enum.Parse(typeof(ProfilingManager.Mode), value); + ProfilingMode = (ProfilingManager.Mode)Enum.Parse(typeof(ProfilingManager.Mode), value); } catch (ArgumentException) { From a767a522d9b8ad9b970e5bf09a0eb8017add5526 Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Wed, 25 Sep 2024 18:52:59 +0100 Subject: [PATCH 2/2] Include build string in profile summary. Add a 40fps bucket --- Assets/Scripts/App.cs | 2 +- Assets/Scripts/Debug/ProfilingManager.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index d7d5a6f373..c26e70c583 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -473,7 +473,7 @@ void DestroyIntroSketch() Resources.UnloadUnusedAssets(); } - static string GetStartupString() + public static string GetStartupString() { string str = $"{App.kAppDisplayName} {Config.m_VersionNumber}"; diff --git a/Assets/Scripts/Debug/ProfilingManager.cs b/Assets/Scripts/Debug/ProfilingManager.cs index d4b3616c04..41f7e51a4f 100644 --- a/Assets/Scripts/Debug/ProfilingManager.cs +++ b/Assets/Scripts/Debug/ProfilingManager.cs @@ -59,7 +59,7 @@ private struct Sample private List m_FrameTimes; private const int k_NumFrames = 75 * 6; // enough space for six seconds of samples. private Coroutine m_UpdateCoroutine; - private int[] m_ValidFramerates = { 90, 75, 60, 1 }; + private int[] m_ValidFramerates = { 90, 75, 60, 40, 1 }; private List m_Samples = new List(); public static ProfilingManager Instance @@ -216,6 +216,7 @@ private void OutputStats() string branch = GitUtils.GetGitBranchName(); message.AppendLine($"Git branch: {branch}"); #endif + message.AppendLine($"Build: {App.GetStartupString()}"); message.AppendLine($"Profile name: {profileName} Filename: {fileName} Human name: {humanName}"); if (App.UserConfig.Profiling.PerfgateOutput)