// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Graphics.Performance; using osu.Framework.Statistics; namespace osu.Framework.Tests.Visual.Testing { public class TestSceneGlobalStatisticsDisplay : FrameworkTestScene { private GlobalStatisticsDisplay display; [BackgroundDependencyLoader] private void load() { Children = new[] { display = new GlobalStatisticsDisplay(), }; display.ToggleVisibility(); GlobalStatistic stat = null; AddStep("Register test statistic", () => stat = GlobalStatistics.Get("TestCase", "Test Statistic")); AddStep("Change value once", () => stat.Value = 10); AddStep("Change value again", () => stat.Value = 20); AddStep("Register statistics non-alphabetically", () => { GlobalStatistics.Get("ZZZZZ", "BBBBB"); GlobalStatistics.Get("ZZZZZ", "AAAAA"); }); AddStep("Register groups non-alphabetically", () => { GlobalStatistics.Get("XXXXX", "BBBBB"); GlobalStatistics.Get("TTTTT", "AAAAA"); }); } } }