mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Statistics Collection / Writing Overhaul (#35)
* Add DatStatistics class * Add isDirectory setting * Add CalculateStatistics method (nw) * Add separate stats writing * Use new methods * Rename Write -> WriteIndividual * Naive implementation of new writing (nw) * Remove unncessary calls * Make writing more DatFile-like * Add console flag to constructor * Remove unused stream constructors * Move to local writers * Remove inherent filename * Fix invocation * Use SeparatedValueWriter * Fix final directory stats output * Use XmlTextWriter for HTML * Don't output separator on last stat output * Remove now-completed TODOs * Remove unused using
This commit is contained in:
@@ -116,8 +116,18 @@ namespace SabreTools.DatTools
|
||||
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
|
||||
var consoleOutput = BaseReport.Create(StatReportFormat.None, null, true, true);
|
||||
consoleOutput.ReplaceStatistics(datFile.Header.FileName, datFile.Items.Keys.Count(), datFile.Items);
|
||||
var statsList = new List<DatStatistics>
|
||||
{
|
||||
new DatStatistics
|
||||
{
|
||||
Statistics = datFile.Items,
|
||||
DisplayName = datFile.Header.FileName,
|
||||
MachineCount = datFile.Items.Keys.Count(),
|
||||
IsDirectory = false,
|
||||
},
|
||||
};
|
||||
var consoleOutput = BaseReport.Create(StatReportFormat.None, statsList);
|
||||
consoleOutput.WriteToFile(null, true, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user