csv output

This commit is contained in:
Andy Adshead 2019-01-24 00:51:11 +00:00
parent 6bd99b6edd
commit abeefc9226
2 changed files with 9 additions and 7 deletions

View file

@ -8,13 +8,15 @@ namespace Ryujinx.Profiler
{
public static void ToFile(string path, InternalProfile profile)
{
String fileData = "";
String fileData = "Name,Session,Count,Average(ms),Total(ms)\r\n";
foreach (var time in profile.Timers.OrderBy(key => key.Key.Tag))
{
fileData += $"{time.Key.Tag} - " +
$"Total: {profile.ConvertTicksToMS(time.Value.TotalTime)}ms, " +
$"Average: {profile.ConvertTicksToMS(time.Value.AverageTime)}ms, " +
$"Count: {time.Value.Count}\r\n";
fileData += $"{time.Key.Name}," +
$"{time.Key.Session}," +
$"{time.Value.Count}," +
$"{profile.ConvertTicksToMS(time.Value.AverageTime)}," +
$"{profile.ConvertTicksToMS(time.Value.TotalTime)}\r\n";
}
// Ensure file directory exists before write

View file

@ -25,8 +25,8 @@ Logging_Filtered_Classes =
#Enable profiling
Profiling_Enabled = true
#Set profile file dump location, if blank file dumping disabled. (e.g. `ProfileDump.txt`)
Profile_Dump_Path = ProfileDump.txt
#Set profile file dump location, if blank file dumping disabled. (e.g. `ProfileDump.csv`)
Profile_Dump_Path = ProfileDump.csv
#System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b
#Change System Language