Add improved FormatBytesCount to print large sizes in more detailed way

Instead of printing `2 GB` output `2.43 GB` to be more explicit.
Deprecate version with `int` in favor of a single `ulong`.
This commit is contained in:
Wojtek Figat
2024-08-17 14:35:13 +02:00
parent 7650cead3d
commit 650a2921a3
7 changed files with 14 additions and 16 deletions

View File

@@ -52,7 +52,7 @@ namespace FlaxEditor.Windows.Profiler
AnchorPreset = AnchorPresets.HorizontalStretchTop,
Offsets = Margin.Zero,
Height = SingleChart.DefaultHeight,
FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
FormatSample = v => Utilities.Utils.FormatBytesCount((ulong)v),
Parent = mainPanel,
};
_memoryUsageChart.SelectedSampleChanged += OnSelectedSampleChanged;