mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Add basic profiling output of realm migrations
This commit is contained in:
parent
0e9576acfb
commit
0916ae1671
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user