2017-05-28 01:16:49 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : ScanResults.cs
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Component : Core algorithms.
|
2017-05-28 01:16:49 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Contains structure to store scan results.
|
2017-05-28 01:16:49 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
|
// it under the terms of the GNU General Public License as
|
|
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
//
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2018-12-29 17:34:38 +00:00
|
|
|
|
// Copyright © 2011-2019 Natalia Portillo
|
2017-05-28 01:16:49 +01:00
|
|
|
|
// ****************************************************************************/
|
2017-12-19 03:50:57 +00:00
|
|
|
|
|
2017-05-28 01:16:49 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.Core.Devices.Scanning
|
|
|
|
|
|
{
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Contains the results of a media scan
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public struct ScanResults
|
|
|
|
|
|
{
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Total time spent scanning
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double TotalTime;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Total time spent by the device processing commands
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double ProcessingTime;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Average scan speed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double AvgSpeed;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Maximum scan speed burst
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double MaxSpeed;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Minimum scan speed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double MinSpeed;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Sectors that took less than 3 milliseconds to be processed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public ulong A;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Sectors that took less than 10 milliseconds but more than 3 milliseconds to be processed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public ulong B;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Sectors that took less than 50 milliseconds but more than 10 milliseconds to be processed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public ulong C;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Sectors that took less than 150 milliseconds but more than 50 milliseconds to be processed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public ulong D;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Sectors that took less than 500 milliseconds but more than 150 milliseconds to be processed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public ulong E;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Sectors that took more than 500 milliseconds to be processed
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-05-28 01:16:49 +01:00
|
|
|
|
public ulong F;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// List of sectors that could not be read
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public List<ulong> UnreadableSectors;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Slowest seek
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double SeekMax;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Fastest seek
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double SeekMin;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// Total time spent seeking
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public double SeekTotal;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// How many seeks have been done
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public int SeekTimes;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// How many blocks were scanned
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public ulong Blocks;
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// <summary>
|
2017-12-23 17:41:23 +00:00
|
|
|
|
/// How many blocks could not be read
|
2017-12-23 01:46:08 +00:00
|
|
|
|
/// </summary>
|
2017-12-20 17:15:26 +00:00
|
|
|
|
public ulong Errored;
|
2017-05-28 01:16:49 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|