Fix byte speed rates not being properly "humanized".

This commit is contained in:
2023-09-26 10:51:43 +01:00
parent 25c5cbaae5
commit 8786474169
22 changed files with 110 additions and 87 deletions

View File

@@ -326,7 +326,7 @@ public partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
bool error = ataReader.ReadBlocks(out cmdBuf, i, blocksToRead, out duration, out _, out _); bool error = ataReader.ReadBlocks(out cmdBuf, i, blocksToRead, out duration, out _, out _);
@@ -397,11 +397,12 @@ public partial class Dump
(end - start).Humanize(minUnit: TimeUnit.Second))); (end - start).Humanize(minUnit: TimeUnit.Second)));
_dumpLog.WriteLine(Localization.Core.Average_dump_speed_0, _dumpLog.WriteLine(Localization.Core.Average_dump_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalDuration.Milliseconds()).
Humanize());
_dumpLog.WriteLine(string.Format(Localization.Core.Average_write_speed_0, _dumpLog.WriteLine(string.Format(Localization.Core.Average_write_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(imageWriteDuration.Seconds()))); Per(imageWriteDuration.Seconds()).Humanize()));
#region Trimming #region Trimming
if(_resume.BadBlocks.Count > 0 && if(_resume.BadBlocks.Count > 0 &&
@@ -592,7 +593,9 @@ public partial class Dump
PulseProgress?. PulseProgress?.
Invoke(string.Format(Localization.Core.Reading_cylinder_0_head_1_sector_2_3, cy, hd, Invoke(string.Format(Localization.Core.Reading_cylinder_0_head_1_sector_2_3, cy, hd,
sc, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond))); sc,
ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).
Humanize()));
bool error = bool error =
ataReader.ReadChs(out cmdBuf, cy, hd, sc, out duration, out recoveredError); ataReader.ReadChs(out cmdBuf, cy, hd, sc, out duration, out recoveredError);
@@ -668,10 +671,12 @@ public partial class Dump
(end - start).Humanize(minUnit: TimeUnit.Second))); (end - start).Humanize(minUnit: TimeUnit.Second)));
_dumpLog.WriteLine(Localization.Core.Average_dump_speed_0, _dumpLog.WriteLine(Localization.Core.Average_dump_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalDuration.Milliseconds()).
Humanize());
_dumpLog.WriteLine(Localization.Core.Average_write_speed_0, _dumpLog.WriteLine(Localization.Core.Average_write_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(imageWriteDuration.Seconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(imageWriteDuration.Seconds()).
Humanize());
} }
foreach(ulong bad in _resume.BadBlocks) foreach(ulong bad in _resume.BadBlocks)
@@ -866,7 +871,8 @@ public partial class Dump
(chkEnd - chkStart).Humanize(minUnit: TimeUnit.Second)); (chkEnd - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0, _dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalChkDuration.Milliseconds()).Humanize());
List<(ulong start, string type)> filesystems = new(); List<(ulong start, string type)> filesystems = new();
@@ -940,15 +946,15 @@ public partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read,
_resume.BadBlocks.Count)); _resume.BadBlocks.Count));

View File

@@ -216,7 +216,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
sense = _dev.ReadCd(out cmdBuf, out senseBuf, firstSectorToRead, blockSize, blocksToRead, sense = _dev.ReadCd(out cmdBuf, out senseBuf, firstSectorToRead, blockSize, blocksToRead,
@@ -232,7 +232,7 @@ partial class Dump
for(uint r = 0; r < _maximumReadable; r++) for(uint r = 0; r < _maximumReadable; r++)
{ {
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i + r, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i + r, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i + r, (long)blocks); (long)i + r, (long)blocks);
sense = _dev.ReadCd(out cmdBuf, out senseBuf, (uint)(i + r), blockSize, (uint)sectorsForOffset + 1, sense = _dev.ReadCd(out cmdBuf, out senseBuf, (uint)(i + r), blockSize, (uint)sectorsForOffset + 1,
@@ -354,10 +354,10 @@ partial class Dump
outputOptical.WriteSectorsLong(data, i, blocksToRead); outputOptical.WriteSectorsLong(data, i, blocksToRead);
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel, bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, 1, ref mcn, tracks, desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, 1, ref mcn, tracks,
subchannelExtents, _fixSubchannelPosition, outputOptical, _fixSubchannel, subchannelExtents, _fixSubchannelPosition, outputOptical, _fixSubchannel,
_fixSubchannelCrc, _dumpLog, UpdateStatus, smallestPregapLbaPerTrack, true, _fixSubchannelCrc, _dumpLog, UpdateStatus, smallestPregapLbaPerTrack, true,
out List<ulong> newPregapSectors); out List<ulong> newPregapSectors);
// Set tracks and go back // Set tracks and go back
if(indexesChanged) if(indexesChanged)

View File

@@ -273,7 +273,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
if(crossingLeadOut && if(crossingLeadOut &&
@@ -425,7 +425,7 @@ partial class Dump
for(uint r = 0; r < blocksToRead; r++) for(uint r = 0; r < blocksToRead; r++)
{ {
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i + r, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i + r, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i + r, (long)blocks); (long)i + r, (long)blocks);
if(_supportsPlextorD8) if(_supportsPlextorD8)
@@ -673,10 +673,10 @@ partial class Dump
} }
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel, bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, (byte)track.Sequence, ref mcn, desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, (byte)track.Sequence, ref mcn,
tracks, subchannelExtents, _fixSubchannelPosition, outputFormat as IWritableOpticalImage, tracks, subchannelExtents, _fixSubchannelPosition, outputFormat as IWritableOpticalImage,
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus, smallestPregapLbaPerTrack, true, _fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus, smallestPregapLbaPerTrack, true,
out List<ulong> newPregapSectors); out List<ulong> newPregapSectors);
// Set tracks and go back // Set tracks and go back
if(indexesChanged) if(indexesChanged)

View File

@@ -1474,14 +1474,15 @@ sealed partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));

View File

@@ -122,7 +122,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
PulseProgress?.Invoke(string.Format(Localization.Core.Reading_sector_0_at_lead_out_1, i, PulseProgress?.Invoke(string.Format(Localization.Core.Reading_sector_0_at_lead_out_1, i,
ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()));
if(readcd) if(readcd)
{ {
@@ -294,7 +294,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
PulseProgress?.Invoke(string.Format(Localization.Core.Reading_sector_0_at_lead_out_1, i, PulseProgress?.Invoke(string.Format(Localization.Core.Reading_sector_0_at_lead_out_1, i,
ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()));
if(readcd) if(readcd)
{ {

View File

@@ -89,7 +89,7 @@ partial class Dump
PulseProgress?.Invoke(string.Format(Localization.Core.Trying_to_read_first_track_pregap_sector_0_1, PulseProgress?.Invoke(string.Format(Localization.Core.Trying_to_read_first_track_pregap_sector_0_1,
firstTrackPregapBlock, firstTrackPregapBlock,
ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()));
// ReSharper disable IntVariableOverflowInUncheckedContext // ReSharper disable IntVariableOverflowInUncheckedContext
sense = _dev.ReadCd(out cmdBuf, out _, (uint)firstTrackPregapBlock, blockSize, 1, MmcSectorTypes.AllTypes, sense = _dev.ReadCd(out cmdBuf, out _, (uint)firstTrackPregapBlock, blockSize, 1, MmcSectorTypes.AllTypes,

View File

@@ -321,7 +321,7 @@ public partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_byte_0_of_1_2, i * 512, romSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_byte_0_of_1_2, i * 512, romSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i * 512, romSize); (long)i * 512, romSize);
sense = _dev.Read10(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)(startSector + i), sense = _dev.Read10(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)(startSector + i),
@@ -373,7 +373,7 @@ public partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_byte_0_of_1_2, romSectors * 512, romSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_byte_0_of_1_2, romSectors * 512, romSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)romSectors * 512, romSize); (long)romSectors * 512, romSize);
sense = _dev.Read10(out readBuffer, out senseBuf, 0, false, true, false, false, romSectors, 512, 0, 1, sense = _dev.Read10(out readBuffer, out senseBuf, 0, false, true, false, false, romSectors, 512, 0, 1,
@@ -417,10 +417,12 @@ public partial class Dump
_dumpLog.WriteLine(string.Format(Localization.Core.Dump_finished_in_0, (end - start).Humanize(minUnit: TimeUnit.Second))); _dumpLog.WriteLine(string.Format(Localization.Core.Dump_finished_in_0, (end - start).Humanize(minUnit: TimeUnit.Second)));
_dumpLog.WriteLine(string.Format(Localization.Core.Average_dump_speed_0, _dumpLog.WriteLine(string.Format(Localization.Core.Average_dump_speed_0,
ByteSize.FromBytes(512 * (romSectors + 1)).Per(totalDuration.Milliseconds()))); ByteSize.FromBytes(512 * (romSectors + 1)).Per(totalDuration.Milliseconds()).
Humanize()));
_dumpLog.WriteLine(string.Format(Localization.Core.Average_write_speed_0, _dumpLog.WriteLine(string.Format(Localization.Core.Average_write_speed_0,
ByteSize.FromBytes(512 * (romSectors + 1)).Per(imageWriteDuration.Seconds()))); ByteSize.FromBytes(512 * (romSectors + 1)).Per(imageWriteDuration.Seconds()).
Humanize()));
var metadata = new CommonTypes.Structs.ImageInfo var metadata = new CommonTypes.Structs.ImageInfo
{ {
@@ -470,15 +472,16 @@ public partial class Dump
(closeEnd - closeStart).Humanize(minUnit: TimeUnit.Second))); (closeEnd - closeStart).Humanize(minUnit: TimeUnit.Second)));
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(512 * (romSectors + 1)). ByteSize.FromBytes(512 * (romSectors + 1)).Per(totalDuration.Milliseconds()).
Per(totalDuration.Milliseconds()))); Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -102,7 +102,8 @@ partial class Dump
_dumpLog.WriteLine(Localization.Core.Sidecar_created_in_0, (end - chkStart).Humanize(minUnit: TimeUnit.Second)); _dumpLog.WriteLine(Localization.Core.Sidecar_created_in_0, (end - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0, _dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds()).
Humanize());
if(_preSidecar != null) if(_preSidecar != null)
{ {

View File

@@ -378,7 +378,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
sense = _dev.Read6(out readBuffer, out _, (uint)i, blockSize, (byte)blocksToRead, _dev.Timeout, sense = _dev.Read6(out readBuffer, out _, (uint)i, blockSize, (byte)blocksToRead, _dev.Timeout,
@@ -539,7 +539,7 @@ partial class Dump
if(dcMode6?.Pages != null) if(dcMode6?.Pages != null)
foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage => foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage =>
modePage is { Page: 0x01, Subpage: 0x00 })) modePage is { Page: 0x01, Subpage: 0x00 }))
currentModePage = modePage; currentModePage = modePage;
} }
@@ -789,7 +789,8 @@ partial class Dump
(end - chkStart).Humanize(minUnit: TimeUnit.Second)); (end - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0, _dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds()).
Humanize());
if(_preSidecar != null) if(_preSidecar != null)
{ {
@@ -873,14 +874,15 @@ partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -211,7 +211,7 @@ public partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, blocks); (long)i, blocks);
sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)i, blockSize, 0, sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)i, blockSize, 0,
@@ -391,7 +391,7 @@ public partial class Dump
if(dcMode6.HasValue) if(dcMode6.HasValue)
foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage => foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage =>
modePage is { Page: 0x01, Subpage: 0x00 })) modePage is { Page: 0x01, Subpage: 0x00 }))
currentModePage = modePage; currentModePage = modePage;
} }
@@ -643,7 +643,8 @@ public partial class Dump
(end - chkStart).Humanize(minUnit: TimeUnit.Second)); (end - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0, _dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds()).
Humanize());
if(_preSidecar != null) if(_preSidecar != null)
{ {
@@ -716,14 +717,15 @@ public partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -233,7 +233,7 @@ public partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)(umdStart + (i * 4)), sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)(umdStart + (i * 4)),
@@ -396,7 +396,7 @@ public partial class Dump
if(dcMode6.HasValue) if(dcMode6.HasValue)
foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage => foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage =>
modePage is { Page: 0x01, Subpage: 0x00 })) modePage is { Page: 0x01, Subpage: 0x00 }))
currentModePage = modePage; currentModePage = modePage;
} }
@@ -617,14 +617,15 @@ public partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -898,7 +898,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
PulseProgress?.Invoke(string.Format(Localization.Core.Reading_block_0_1, currentBlock, PulseProgress?.Invoke(string.Format(Localization.Core.Reading_block_0_1, currentBlock,
ByteSize.FromBytes(currentSpeed).Per(_oneSecond))); ByteSize.FromBytes(currentSpeed).Per(_oneSecond).Humanize()));
sense = _dev.Read6(out cmdBuf, out senseBuf, false, fixedLen, transferLen, blockSize, _dev.Timeout, sense = _dev.Read6(out cmdBuf, out senseBuf, false, fixedLen, transferLen, blockSize, _dev.Timeout,
out duration); out duration);
@@ -1393,7 +1393,8 @@ partial class Dump
(end - chkStart).Humanize(minUnit: TimeUnit.Second)); (end - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0, _dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds()).
Humanize());
if(_preSidecar != null) if(_preSidecar != null)
{ {
@@ -1478,14 +1479,15 @@ partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -101,7 +101,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
sense = scsiReader.ReadBlocks(out buffer, i, blocksToRead, out double cmdDuration, out _, out _); sense = scsiReader.ReadBlocks(out buffer, i, blocksToRead, out double cmdDuration, out _, out _);

View File

@@ -1303,14 +1303,15 @@ partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds())).Humanize());
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -208,7 +208,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
sense = scsiReader.ReadBlocks(out buffer, i, blocksToRead, out double cmdDuration, out _, out _); sense = scsiReader.ReadBlocks(out buffer, i, blocksToRead, out double cmdDuration, out _, out _);

View File

@@ -651,7 +651,7 @@ public partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)blocks); (long)i, (long)blocks);
if(blocksToRead == 1) if(blocksToRead == 1)
@@ -951,7 +951,8 @@ public partial class Dump
(end - chkStart).Humanize(minUnit: TimeUnit.Second)); (end - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0, _dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds())); ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds()).
Humanize());
(string type, string subType) xmlType = (null, null); (string type, string subType) xmlType = (null, null);
@@ -1011,14 +1012,15 @@ public partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -649,7 +649,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)totalSize); (long)i, (long)totalSize);
sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, false, false, false, (uint)i, blockSize, 0, sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, false, false, false, (uint)i, blockSize, 0,
@@ -781,7 +781,7 @@ partial class Dump
blocksToRead = (uint)(middleZone - 1 - middle); blocksToRead = (uint)(middleZone - 1 - middle);
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, middle + currentSector, totalSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, middle + currentSector, totalSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)(middle + currentSector), (long)totalSize); (long)(middle + currentSector), (long)totalSize);
mhddLog.Write(middle + currentSector, cmdDuration, blocksToRead); mhddLog.Write(middle + currentSector, cmdDuration, blocksToRead);
@@ -850,7 +850,7 @@ partial class Dump
minSpeed = currentSpeed; minSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, currentSector, totalSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, currentSector, totalSize, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)currentSector, (long)totalSize); (long)currentSector, (long)totalSize);
sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, false, false, false, (uint)l1, blockSize, 0, sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, false, false, false, (uint)l1, blockSize, 0,
@@ -1332,15 +1332,15 @@ partial class Dump
UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)). ByteSize.FromBytes(blockSize * (blocks + 1)).
Per(totalDuration.Milliseconds()))); Per(totalDuration.Milliseconds()).Humanize()));
if(maxSpeed > 0) if(maxSpeed > 0)
UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(maxSpeed).Per(_oneSecond).Humanize()));
if(minSpeed is > 0 and < double.MaxValue) if(minSpeed is > 0 and < double.MaxValue)
UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0, UpdateStatus?.Invoke(string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromMegabytes(minSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(minSpeed).Per(_oneSecond).Humanize()));
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count)); UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
UpdateStatus?.Invoke(""); UpdateStatus?.Invoke("");

View File

@@ -152,7 +152,7 @@ public sealed partial class MediaScan
results.MinSpeed = currentSpeed; results.MinSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)results.Blocks); (long)i, (long)results.Blocks);
bool error = ataReader.ReadBlocks(out cmdBuf, i, blocksToRead, out duration, out _, out _); bool error = ataReader.ReadBlocks(out cmdBuf, i, blocksToRead, out duration, out _, out _);
@@ -285,7 +285,8 @@ public sealed partial class MediaScan
PulseProgress?.Invoke(string.Format(Localization.Core.Reading_cylinder_0_head_1_sector_2_3, PulseProgress?.Invoke(string.Format(Localization.Core.Reading_cylinder_0_head_1_sector_2_3,
cy, hd, sc, cy, hd, sc,
ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond))); ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).
Humanize()));
bool error = ataReader.ReadChs(out cmdBuf, cy, hd, sc, out duration, out _); bool error = ataReader.ReadChs(out cmdBuf, cy, hd, sc, out duration, out _);

View File

@@ -364,7 +364,7 @@ public sealed partial class MediaScan
results.MinSpeed = currentSpeed; results.MinSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)results.Blocks); (long)i, (long)results.Blocks);
if(readcd) if(readcd)
@@ -521,7 +521,7 @@ public sealed partial class MediaScan
results.MinSpeed = currentSpeed; results.MinSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromMegabytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)results.Blocks); (long)i, (long)results.Blocks);
sense = scsiReader.ReadBlocks(out _, i, blocksToRead, out double cmdDuration, out _, out _); sense = scsiReader.ReadBlocks(out _, i, blocksToRead, out double cmdDuration, out _, out _);

View File

@@ -245,7 +245,7 @@ public sealed partial class MediaScan
results.MinSpeed = currentSpeed; results.MinSpeed = currentSpeed;
UpdateProgress?. UpdateProgress?.
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromBytes(currentSpeed).Per(_oneSecond)), Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2, i, results.Blocks, ByteSize.FromBytes(currentSpeed).Per(_oneSecond).Humanize()),
(long)i, (long)results.Blocks); (long)i, (long)results.Blocks);
bool error; bool error;

View File

@@ -48,9 +48,9 @@ using Humanizer.Bytes;
using Humanizer.Localisation; using Humanizer.Localisation;
using MsBox.Avalonia; using MsBox.Avalonia;
using MsBox.Avalonia.Enums; using MsBox.Avalonia.Enums;
using ReactiveUI;
//using OxyPlot; //using OxyPlot;
using ReactiveUI;
namespace Aaru.Gui.ViewModels.Windows; namespace Aaru.Gui.ViewModels.Windows;
@@ -404,13 +404,13 @@ public sealed class MediaScanViewModel : ViewModelBase
results.ProcessingTime.Seconds().Humanize(minUnit: TimeUnit.Second)); results.ProcessingTime.Seconds().Humanize(minUnit: TimeUnit.Second));
AvgSpeed = string.Format(Localization.Core.Average_speed_0, AvgSpeed = string.Format(Localization.Core.Average_speed_0,
ByteSize.FromBytes(results.AvgSpeed).Per(1.Seconds())); ByteSize.FromBytes(results.AvgSpeed).Per(1.Seconds()).Humanize());
MaxSpeed = string.Format(Localization.Core.Fastest_speed_burst_0, MaxSpeed = string.Format(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromBytes(results.MaxSpeed).Per(1.Seconds())); ByteSize.FromBytes(results.MaxSpeed).Per(1.Seconds()).Humanize());
MinSpeed = string.Format(Localization.Core.Slowest_speed_burst_0, MinSpeed = string.Format(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromBytes(results.MinSpeed).Per(1.Seconds())); ByteSize.FromBytes(results.MinSpeed).Per(1.Seconds()).Humanize());
A = string.Format(Localization.Core._0_sectors_took_less_than_3_ms, results.A); A = string.Format(Localization.Core._0_sectors_took_less_than_3_ms, results.A);
B = string.Format(Localization.Core._0_sectors_took_less_than_10_ms_but_more_than_3_ms, results.B); B = string.Format(Localization.Core._0_sectors_took_less_than_10_ms_but_more_than_3_ms, results.B);

View File

@@ -211,13 +211,14 @@ sealed class MediaScanCommand : Command
results.TotalTime.Seconds().Humanize(minUnit: TimeUnit.Second), results.TotalTime.Seconds().Humanize(minUnit: TimeUnit.Second),
results.ProcessingTime.Seconds().Humanize(minUnit: TimeUnit.Second)); results.ProcessingTime.Seconds().Humanize(minUnit: TimeUnit.Second));
AaruConsole.WriteLine(Localization.Core.Average_speed_0, ByteSize.FromBytes(results.AvgSpeed).Per(1.Seconds())); AaruConsole.WriteLine(Localization.Core.Average_speed_0,
ByteSize.FromBytes(results.AvgSpeed).Per(1.Seconds()).Humanize());
AaruConsole.WriteLine(Localization.Core.Fastest_speed_burst_0, AaruConsole.WriteLine(Localization.Core.Fastest_speed_burst_0,
ByteSize.FromBytes(results.MaxSpeed).Per(1.Seconds())); ByteSize.FromBytes(results.MaxSpeed).Per(1.Seconds()).Humanize());
AaruConsole.WriteLine(Localization.Core.Slowest_speed_burst_0, AaruConsole.WriteLine(Localization.Core.Slowest_speed_burst_0,
ByteSize.FromBytes(results.MinSpeed).Per(1.Seconds())); ByteSize.FromBytes(results.MinSpeed).Per(1.Seconds()).Humanize());
AaruConsole.WriteLine(); AaruConsole.WriteLine();
AaruConsole.WriteLine($"[bold]{Localization.Core.Summary}:[/]"); AaruConsole.WriteLine($"[bold]{Localization.Core.Summary}:[/]");