[UI] Fix speed values humanization.

This commit is contained in:
2024-04-26 03:18:47 +01:00
parent b48545b0b4
commit 4acc1beaf4
12 changed files with 101 additions and 54 deletions

View File

@@ -802,22 +802,26 @@ partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_dump_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds())));
Per(totalDuration.Milliseconds()).
Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_write_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(imageWriteDuration.Seconds())));
Per(imageWriteDuration.Seconds()).
Humanize()));
_dumpLog.WriteLine(string.Format(Localization.Core.Dump_finished_in_0,
_dumpStopwatch.Elapsed.Humanize(minUnit: TimeUnit.Second)));
_dumpLog.WriteLine(string.Format(Localization.Core.Average_dump_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds())));
Per(totalDuration.Milliseconds()).
Humanize()));
_dumpLog.WriteLine(string.Format(Localization.Core.Average_write_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(imageWriteDuration.Seconds())));
Per(imageWriteDuration.Seconds()).
Humanize()));
#region Trimming
@@ -1114,14 +1118,16 @@ partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalChkDuration.Milliseconds())));
Per(totalChkDuration.Milliseconds()).
Humanize()));
_dumpLog.WriteLine(Localization.Core.Sidecar_created_in_0,
_sidecarStopwatch.Elapsed.Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalChkDuration.Milliseconds()));
Per(totalChkDuration.Milliseconds()).
Humanize());
if(_preSidecar != null)
{