Store and show statistics for "ls" and "extract-files"

commands.
This commit is contained in:
2017-06-04 23:07:31 +01:00
parent 7c825f86a2
commit 7105fbb333
9 changed files with 32 additions and 1 deletions

View File

@@ -290,10 +290,18 @@ namespace DiscImageChef.Core
AllStats.Commands.Entropy++; AllStats.Commands.Entropy++;
CurrentStats.Commands.Entropy++; CurrentStats.Commands.Entropy++;
break; break;
case "extract-files":
AllStats.Commands.Entropy++;
CurrentStats.Commands.Entropy++;
break;
case "formats": case "formats":
AllStats.Commands.Formats++; AllStats.Commands.Formats++;
CurrentStats.Commands.Formats++; CurrentStats.Commands.Formats++;
break; break;
case "ls":
AllStats.Commands.Formats++;
CurrentStats.Commands.Formats++;
break;
case "media-info": case "media-info":
AllStats.Commands.MediaInfo++; AllStats.Commands.MediaInfo++;
CurrentStats.Commands.MediaInfo++; CurrentStats.Commands.MediaInfo++;

View File

@@ -72,7 +72,9 @@ namespace DiscImageChef.Metadata
public long DeviceReport; public long DeviceReport;
public long DumpMedia; public long DumpMedia;
public long Entropy; public long Entropy;
public long ExtractFiles;
public long Formats; public long Formats;
public long Ls;
public long MediaInfo; public long MediaInfo;
public long MediaScan; public long MediaScan;
public long PrintHex; public long PrintHex;

View File

@@ -1,3 +1,11 @@
2017-06-04 Natalia Portillo <claunia@claunia.com>
* Default.aspx:
* Default.aspx.cs:
* Default.aspx.designer.cs:
* UploadStatsController.cs: Store and show statistics for "ls"
and "extract-files" commands.
2017-06-04 Natalia Portillo <claunia@claunia.com> 2017-06-04 Natalia Portillo <claunia@claunia.com>
* UploadStatsController.cs: Added support for versions. * UploadStatsController.cs: Added support for versions.

View File

@@ -107,6 +107,8 @@ namespace DiscImageChef.Server.Controllers
oldStats.Commands.MediaScan += newStats.Commands.MediaScan; oldStats.Commands.MediaScan += newStats.Commands.MediaScan;
oldStats.Commands.PrintHex += newStats.Commands.PrintHex; oldStats.Commands.PrintHex += newStats.Commands.PrintHex;
oldStats.Commands.Verify += newStats.Commands.Verify; oldStats.Commands.Verify += newStats.Commands.Verify;
oldStats.Commands.Ls += newStats.Commands.Ls;
oldStats.Commands.ExtractFiles += newStats.Commands.ExtractFiles;
} }
} }

View File

@@ -47,7 +47,9 @@
<i>device-report</i> command has been run <asp:Label id="lblDeviceReport" runat="server"/> times<br/> <i>device-report</i> command has been run <asp:Label id="lblDeviceReport" runat="server"/> times<br/>
<i>dump-media</i> command has been run <asp:Label id="lblDumpMedia" runat="server"/> times<br/> <i>dump-media</i> command has been run <asp:Label id="lblDumpMedia" runat="server"/> times<br/>
<i>entropy</i> command has been run <asp:Label id="lblEntropy" runat="server"/> times<br/> <i>entropy</i> command has been run <asp:Label id="lblEntropy" runat="server"/> times<br/>
<i>extract-files</i> command has been run <asp:Label id="lblExtractFiles" runat="server"/> times<br/>
<i>formats</i> command has been run <asp:Label id="lblFormats" runat="server"/> times<br/> <i>formats</i> command has been run <asp:Label id="lblFormats" runat="server"/> times<br/>
<i>ls</i> command has been run <asp:Label id="lblLs" runat="server"/> times<br/>
<i>media-info</i> command has been run <asp:Label id="lblMediaInfo" runat="server"/> times<br/> <i>media-info</i> command has been run <asp:Label id="lblMediaInfo" runat="server"/> times<br/>
<i>media-scan</i> command has been run <asp:Label id="lblMediaScan" runat="server"/> times<br/> <i>media-scan</i> command has been run <asp:Label id="lblMediaScan" runat="server"/> times<br/>
<i>printhex</i> command has been run <asp:Label id="lblPrintHex" runat="server"/> times<br/> <i>printhex</i> command has been run <asp:Label id="lblPrintHex" runat="server"/> times<br/>

View File

@@ -103,6 +103,8 @@ namespace DiscImageChef.Server
lblCreateSidecar.Text = statistics.Commands.CreateSidecar.ToString(); lblCreateSidecar.Text = statistics.Commands.CreateSidecar.ToString();
lblDumpMedia.Text = statistics.Commands.DumpMedia.ToString(); lblDumpMedia.Text = statistics.Commands.DumpMedia.ToString();
lblDeviceReport.Text = statistics.Commands.DeviceReport.ToString(); lblDeviceReport.Text = statistics.Commands.DeviceReport.ToString();
lblLs.Text = statistics.Commands.Ls.ToString();
lblExtractFiles.Text = statistics.Commands.ExtractFiles.ToString();
} }
else else
divCommands.Visible = false; divCommands.Visible = false;

View File

@@ -49,8 +49,12 @@ namespace DiscImageChef.Server {
protected System.Web.UI.WebControls.Label lblEntropy; protected System.Web.UI.WebControls.Label lblEntropy;
protected System.Web.UI.WebControls.Label lblExtractFiles;
protected System.Web.UI.WebControls.Label lblFormats; protected System.Web.UI.WebControls.Label lblFormats;
protected System.Web.UI.WebControls.Label lblLs;
protected System.Web.UI.WebControls.Label lblMediaInfo; protected System.Web.UI.WebControls.Label lblMediaInfo;
protected System.Web.UI.WebControls.Label lblMediaScan; protected System.Web.UI.WebControls.Label lblMediaScan;

View File

@@ -1,3 +1,6 @@
* Commands/ExtractFiles.cs:
Store and show statistics for "ls" and "extract-files" commands.
* Commands/DeviceReport.cs: * Commands/DeviceReport.cs:
Don't generate report files with '/', '\\' or '?' characters. Don't generate report files with '/', '\\' or '?' characters.

View File

@@ -379,7 +379,7 @@ namespace DiscImageChef.Commands
DicConsole.DebugWriteLine("Extract-Files command", ex.StackTrace); DicConsole.DebugWriteLine("Extract-Files command", ex.StackTrace);
} }
Core.Statistics.AddCommand("ls"); Core.Statistics.AddCommand("extract-files");
} }
} }
} }