csv output
This commit is contained in:
parent
6bd99b6edd
commit
abeefc9226
2 changed files with 9 additions and 7 deletions
|
@ -8,13 +8,15 @@ namespace Ryujinx.Profiler
|
||||||
{
|
{
|
||||||
public static void ToFile(string path, InternalProfile profile)
|
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))
|
foreach (var time in profile.Timers.OrderBy(key => key.Key.Tag))
|
||||||
{
|
{
|
||||||
fileData += $"{time.Key.Tag} - " +
|
fileData += $"{time.Key.Name}," +
|
||||||
$"Total: {profile.ConvertTicksToMS(time.Value.TotalTime)}ms, " +
|
$"{time.Key.Session}," +
|
||||||
$"Average: {profile.ConvertTicksToMS(time.Value.AverageTime)}ms, " +
|
$"{time.Value.Count}," +
|
||||||
$"Count: {time.Value.Count}\r\n";
|
$"{profile.ConvertTicksToMS(time.Value.AverageTime)}," +
|
||||||
|
$"{profile.ConvertTicksToMS(time.Value.TotalTime)}\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure file directory exists before write
|
// Ensure file directory exists before write
|
||||||
|
|
|
@ -25,8 +25,8 @@ Logging_Filtered_Classes =
|
||||||
#Enable profiling
|
#Enable profiling
|
||||||
Profiling_Enabled = true
|
Profiling_Enabled = true
|
||||||
|
|
||||||
#Set profile file dump location, if blank file dumping disabled. (e.g. `ProfileDump.txt`)
|
#Set profile file dump location, if blank file dumping disabled. (e.g. `ProfileDump.csv`)
|
||||||
Profile_Dump_Path = ProfileDump.txt
|
Profile_Dump_Path = ProfileDump.csv
|
||||||
|
|
||||||
#System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b
|
#System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b
|
||||||
#Change System Language
|
#Change System Language
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue