update profile markers for DefaultDebugService

This commit is contained in:
Mikhail 2024-01-29 01:10:05 +08:00
parent 5fac3fd97c
commit ff6d8cba5a

View File

@ -176,7 +176,11 @@ namespace DCFApixels.DragonECS
}
public override void ProfilerMarkBegin(int id)
{
var color = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.DarkGray;
_stopwatchs[id].Start();
Print("ProfilerMark", $"{_stopwatchsNames[id]} start <");
Console.ForegroundColor = color;
}
public override void ProfilerMarkEnd(int id)
{
@ -185,7 +189,7 @@ namespace DCFApixels.DragonECS
_stopwatchs[id].Stop();
var time = _stopwatchs[id].Elapsed;
_stopwatchs[id].Reset();
Print("ProfilerMark", _stopwatchsNames[id] + " s:" + time.TotalSeconds);
Print("ProfilerMark", $"> {_stopwatchsNames[id]} s:{time.TotalSeconds}");
Console.ForegroundColor = color;
}
protected override void OnDelProfilerMark(int id)