mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Register command statistics earlier.
This commit is contained in:
1
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
1
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -98,6 +98,7 @@
|
|||||||
<e p="DiscImageChef.CommonTypes.csproj" t="IncludeRecursive" />
|
<e p="DiscImageChef.CommonTypes.csproj" t="IncludeRecursive" />
|
||||||
<e p="Enums" t="Include">
|
<e p="Enums" t="Include">
|
||||||
<e p="DeviceType.cs" t="Include" />
|
<e p="DeviceType.cs" t="Include" />
|
||||||
|
<e p="ErrorNumber.cs" t="Include" />
|
||||||
<e p="Images.cs" t="Include" />
|
<e p="Images.cs" t="Include" />
|
||||||
</e>
|
</e>
|
||||||
<e p="Exceptions" t="Include">
|
<e p="Exceptions" t="Include">
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("analyze");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -287,7 +288,6 @@ namespace DiscImageChef.Commands
|
|||||||
return (int)ErrorNumber.UnexpectedException;
|
return (int)ErrorNumber.UnexpectedException;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("analyze");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("benchmark");
|
||||||
|
|
||||||
if(extra.Count != 0)
|
if(extra.Count != 0)
|
||||||
{
|
{
|
||||||
@@ -109,7 +110,6 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Max memory used is {0} bytes", results.MaxMemory);
|
DicConsole.WriteLine("Max memory used is {0} bytes", results.MaxMemory);
|
||||||
DicConsole.WriteLine("Min memory used is {0} bytes", results.MinMemory);
|
DicConsole.WriteLine("Min memory used is {0} bytes", results.MinMemory);
|
||||||
|
|
||||||
Statistics.AddCommand("benchmark");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("checksum");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -305,7 +306,6 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Disk's {0}: {1}", chk.type, chk.Value);
|
DicConsole.WriteLine("Disk's {0}: {1}", chk.type, chk.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("checksum");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("compare");
|
||||||
|
|
||||||
if(extra.Count > 2)
|
if(extra.Count > 2)
|
||||||
{
|
{
|
||||||
@@ -398,7 +399,6 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
DicConsole.WriteLine(sb.ToString());
|
DicConsole.WriteLine(sb.ToString());
|
||||||
|
|
||||||
Statistics.AddCommand("compare");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("convert-image");
|
||||||
|
|
||||||
if(extra.Count > 2)
|
if(extra.Count > 2)
|
||||||
{
|
{
|
||||||
@@ -793,8 +794,7 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine();
|
DicConsole.WriteLine();
|
||||||
DicConsole.WriteLine("Conversion done.");
|
DicConsole.WriteLine("Conversion done.");
|
||||||
|
|
||||||
Statistics.AddCommand("convert-image");
|
return (int)ErrorNumber.NoError;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,6 +92,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("create-sidecar");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -201,8 +202,6 @@ namespace DiscImageChef.Commands
|
|||||||
XmlSerializer xmlSer = new XmlSerializer(typeof(CICMMetadataType));
|
XmlSerializer xmlSer = new XmlSerializer(typeof(CICMMetadataType));
|
||||||
xmlSer.Serialize(xmlFs, sidecar);
|
xmlSer.Serialize(xmlFs, sidecar);
|
||||||
xmlFs.Close();
|
xmlFs.Close();
|
||||||
|
|
||||||
Statistics.AddCommand("create-sidecar");
|
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
@@ -236,8 +235,6 @@ namespace DiscImageChef.Commands
|
|||||||
XmlSerializer xmlSer = new XmlSerializer(typeof(CICMMetadataType));
|
XmlSerializer xmlSer = new XmlSerializer(typeof(CICMMetadataType));
|
||||||
xmlSer.Serialize(xmlFs, sidecar);
|
xmlSer.Serialize(xmlFs, sidecar);
|
||||||
xmlFs.Close();
|
xmlFs.Close();
|
||||||
|
|
||||||
Statistics.AddCommand("create-sidecar");
|
|
||||||
}
|
}
|
||||||
else DicConsole.ErrorWriteLine("The specified input file cannot be found.");
|
else DicConsole.ErrorWriteLine("The specified input file cannot be found.");
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("decode");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -318,7 +319,6 @@ namespace DiscImageChef.Commands
|
|||||||
// TODO: Not implemented
|
// TODO: Not implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("decode");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("device-info");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -907,10 +908,7 @@ namespace DiscImageChef.Commands
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("device-info");
|
|
||||||
|
|
||||||
dev.Close();
|
dev.Close();
|
||||||
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("device-report");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -977,8 +978,6 @@ namespace DiscImageChef.Commands
|
|||||||
jsonSw.Close();
|
jsonSw.Close();
|
||||||
jsonFs.Close();
|
jsonFs.Close();
|
||||||
|
|
||||||
Statistics.AddCommand("device-report");
|
|
||||||
|
|
||||||
using(DicContext ctx = DicContext.Create(Settings.Settings.LocalDbPath))
|
using(DicContext ctx = DicContext.Create(Settings.Settings.LocalDbPath))
|
||||||
{
|
{
|
||||||
ctx.Reports.Add(new Report(report));
|
ctx.Reports.Add(new Report(report));
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("dump-media");
|
||||||
|
|
||||||
if(extra.Count > 2)
|
if(extra.Count > 2)
|
||||||
{
|
{
|
||||||
@@ -350,9 +351,6 @@ namespace DiscImageChef.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
dumpLog.Close();
|
dumpLog.Close();
|
||||||
|
|
||||||
Statistics.AddCommand("dump-media");
|
|
||||||
|
|
||||||
dev.Close();
|
dev.Close();
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("entropy");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -153,7 +154,6 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
if(!wholeDisc)
|
if(!wholeDisc)
|
||||||
{
|
{
|
||||||
Statistics.AddCommand("entropy");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +164,6 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Disk has {0} unique sectors ({1:P3})", entropy.UniqueSectors,
|
DicConsole.WriteLine("Disk has {0} unique sectors ({1:P3})", entropy.UniqueSectors,
|
||||||
(double)entropy.UniqueSectors / (double)entropy.Sectors);
|
(double)entropy.UniqueSectors / (double)entropy.Sectors);
|
||||||
|
|
||||||
Statistics.AddCommand("entropy");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("extract-files");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -801,7 +802,6 @@ namespace DiscImageChef.Commands
|
|||||||
return (int)ErrorNumber.UnexpectedException;
|
return (int)ErrorNumber.UnexpectedException;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("extract-files");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("formats");
|
||||||
|
|
||||||
if(extra.Count > 0)
|
if(extra.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -153,7 +154,6 @@ namespace DiscImageChef.Commands
|
|||||||
else
|
else
|
||||||
DicConsole.WriteLine(kvp.Value.Name);
|
DicConsole.WriteLine(kvp.Value.Name);
|
||||||
|
|
||||||
Statistics.AddCommand("formats");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("image-info");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -146,7 +147,6 @@ namespace DiscImageChef.Commands
|
|||||||
return (int)ErrorNumber.UnexpectedException;
|
return (int)ErrorNumber.UnexpectedException;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("image-info");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("list-devices");
|
||||||
|
|
||||||
if(extra.Count > 0)
|
if(extra.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -98,7 +99,6 @@ namespace DiscImageChef.Commands
|
|||||||
dev.Model, dev.Serial, dev.Bus, dev.Supported);
|
dev.Model, dev.Serial, dev.Bus, dev.Supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("list-devices");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("list-encodings");
|
||||||
|
|
||||||
if(extra.Count > 0)
|
if(extra.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -99,7 +100,6 @@ namespace DiscImageChef.Commands
|
|||||||
foreach(CommonEncodingInfo info in encodings.OrderBy(t => t.DisplayName))
|
foreach(CommonEncodingInfo info in encodings.OrderBy(t => t.DisplayName))
|
||||||
DicConsole.WriteLine("{0,-16} {1,-8}", info.Name, info.DisplayName);
|
DicConsole.WriteLine("{0,-16} {1,-8}", info.Name, info.DisplayName);
|
||||||
|
|
||||||
Statistics.AddCommand("list-encodings");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
DicConsole.DebugWriteLine("List-Options command", "--debug={0}", MainClass.Debug);
|
DicConsole.DebugWriteLine("List-Options command", "--debug={0}", MainClass.Debug);
|
||||||
DicConsole.DebugWriteLine("List-Options command", "--verbose={0}", MainClass.Verbose);
|
DicConsole.DebugWriteLine("List-Options command", "--verbose={0}", MainClass.Verbose);
|
||||||
|
Statistics.AddCommand("list-options");
|
||||||
|
|
||||||
PluginBase plugins = GetPluginBase.Instance;
|
PluginBase plugins = GetPluginBase.Instance;
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.DebugWriteLine("Ls command", "--input={0}", inputFile);
|
DicConsole.DebugWriteLine("Ls command", "--input={0}", inputFile);
|
||||||
DicConsole.DebugWriteLine("Ls command", "--options={0}", pluginOptions);
|
DicConsole.DebugWriteLine("Ls command", "--options={0}", pluginOptions);
|
||||||
DicConsole.DebugWriteLine("Ls command", "--verbose={0}", MainClass.Verbose);
|
DicConsole.DebugWriteLine("Ls command", "--verbose={0}", MainClass.Verbose);
|
||||||
|
Statistics.AddCommand("ls");
|
||||||
|
|
||||||
FiltersList filtersList = new FiltersList();
|
FiltersList filtersList = new FiltersList();
|
||||||
IFilter inputFilter = filtersList.GetFilter(inputFile);
|
IFilter inputFilter = filtersList.GetFilter(inputFile);
|
||||||
@@ -354,7 +355,6 @@ namespace DiscImageChef.Commands
|
|||||||
return (int)ErrorNumber.UnexpectedException;
|
return (int)ErrorNumber.UnexpectedException;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("ls");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("media-info");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -142,8 +143,6 @@ namespace DiscImageChef.Commands
|
|||||||
default: throw new NotSupportedException("Unknown device type.");
|
default: throw new NotSupportedException("Unknown device type.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("media-info");
|
|
||||||
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("media-scan");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -158,8 +159,6 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Testing {0} seeks, longest seek took {1:F3} ms, fastest one took {2:F3} ms. ({3:F3} ms average)",
|
DicConsole.WriteLine("Testing {0} seeks, longest seek took {1:F3} ms, fastest one took {2:F3} ms. ({3:F3} ms average)",
|
||||||
results.SeekTimes, results.SeekMax, results.SeekMin, results.SeekTotal / 1000);
|
results.SeekTimes, results.SeekMax, results.SeekMin, results.SeekTotal / 1000);
|
||||||
|
|
||||||
Statistics.AddCommand("media-scan");
|
|
||||||
|
|
||||||
dev.Close();
|
dev.Close();
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("print-hex");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -155,7 +156,6 @@ namespace DiscImageChef.Commands
|
|||||||
PrintHex.PrintHexArray(sector, widthBytes);
|
PrintHex.PrintHexArray(sector, widthBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("print-hex");
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ namespace DiscImageChef.Commands
|
|||||||
MainClass.PrintCopyright();
|
MainClass.PrintCopyright();
|
||||||
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
if(MainClass.Debug) DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
|
||||||
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
if(MainClass.Verbose) DicConsole.VerboseWriteLineEvent += System.Console.WriteLine;
|
||||||
|
Statistics.AddCommand("verify");
|
||||||
|
|
||||||
if(extra.Count > 1)
|
if(extra.Count > 1)
|
||||||
{
|
{
|
||||||
@@ -293,8 +294,6 @@ namespace DiscImageChef.Commands
|
|||||||
else if((ulong)unknownLbas.Count < inputFormat.Info.Sectors) correctSectors = true;
|
else if((ulong)unknownLbas.Count < inputFormat.Info.Sectors) correctSectors = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statistics.AddCommand("verify");
|
|
||||||
|
|
||||||
switch(correctImage)
|
switch(correctImage)
|
||||||
{
|
{
|
||||||
case null when correctSectors is null: return (int)ErrorNumber.NotVerificable;
|
case null when correctSectors is null: return (int)ErrorNumber.NotVerificable;
|
||||||
|
|||||||
Reference in New Issue
Block a user