Class ContentStatsCollection
A collection of content building statistics for use in diagnosing content issues.
public class ContentStatsCollection
- Inheritance
-
ContentStatsCollection
- Inherited Members
Fields
Extension
The file extension used by the content pipeline after building to store the content statistics.
Read only - cannot be assigned to
public static readonly string Extension
Field Value
Properties
PreviousStats
Optionally used for copying stats that were stored in another collection.
public ContentStatsCollection PreviousStats { get; set; }
Property Value
Stats
The internal content statistics dictionary.
public IReadOnlyDictionary<string, ContentStats> Stats { get; }
Property Value
Methods
CopyPreviousStats(string)
Copy content building stats to the current collection from the PreviousStats.
public void CopyPreviousStats(string sourceFile)
Parameters
sourceFile
stringThe absolute path to the source asset file.
MergePreviousStats()
Merge in statistics from PreviousStats that do not exist in this collection.
public void MergePreviousStats()
Read(string)
Load the content statistics from a folder.
public static ContentStatsCollection Read(string outputPath)
Parameters
outputPath
stringThe folder where the .mgstats file can be found.
Returns
- ContentStatsCollection
Returns the content statistics or an empty collection.
RecordStats(string, string, string, Type, float)
Store content building stats for a source file.
public void RecordStats(string sourceFile, string destFile, string processorType, Type contentType, float buildSeconds)
Parameters
sourceFile
stringThe absolute path to the source asset file.
destFile
stringThe absolute path to the destination content file.
processorType
stringThe type name of the content processor.
contentType
TypeThe content type object.
buildSeconds
floatThe build time in seconds.
Reset()
Clears all the content statistics.
public void Reset()
TryGetStats(string, out ContentStats)
Get the content statistics for a source file and returns true if found.
public bool TryGetStats(string sourceFile, out ContentStats stats)
Parameters
sourceFile
stringstats
ContentStats
Returns
Write(string)
Write the content statistics to a folder with the .mgstats file name.
public void Write(string outputPath)
Parameters
outputPath
stringThe folder to write the .mgstats file.