1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 07:09:53 +08:00

Add basic profiling output of realm migrations

This commit is contained in:
Dean Herbert
2023-06-13 01:48:32 +09:00
Unverified
parent 21f9acb882
commit cd0d5e4521
2 changed files with 8 additions and 1 deletions
+8
View File
@@ -37,6 +37,7 @@ using osu.Game.Scoring.Legacy;
using osu.Game.Skinning;
using Realms;
using Realms.Exceptions;
using Stopwatch = System.Diagnostics.Stopwatch;
namespace osu.Game.Database
{
@@ -728,6 +729,11 @@ namespace osu.Game.Database
private void applyMigrationsForVersion(Migration migration, ulong targetVersion)
{
Logger.Log($"Running realm migration to version {targetVersion}...");
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
switch (targetVersion)
{
case 7:
@@ -964,6 +970,8 @@ namespace osu.Game.Database
break;
}
}
Logger.Log($"Migration completed in {stopwatch.ElapsedMilliseconds}ms");
}
private string? getRulesetShortNameFromLegacyID(long rulesetId)
@@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Judgements;