aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Profiler/DumpProfile.cs
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2020-02-06 11:25:47 +0000
committerGitHub <noreply@github.com>2020-02-06 11:25:47 +0000
commitf2b9a9c2b0a3d7af3b56df9ae09db8a3b2d8506c (patch)
tree7c4a0019c1c904397927567a0ad0685299cce1eb /Ryujinx.Profiler/DumpProfile.cs
parentdb9f8f999f2c9a50e25685424271735ed3538539 (diff)
Render Profiler in GUI (#854)
* move profiler output to gui * addressed commits, rebased * removed whitespaces
Diffstat (limited to 'Ryujinx.Profiler/DumpProfile.cs')
-rw-r--r--Ryujinx.Profiler/DumpProfile.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/Ryujinx.Profiler/DumpProfile.cs b/Ryujinx.Profiler/DumpProfile.cs
deleted file mode 100644
index 62a02761..00000000
--- a/Ryujinx.Profiler/DumpProfile.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using Ryujinx.Common;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace Ryujinx.Profiler
-{
- public static class DumpProfile
- {
- public static void ToFile(string path, InternalProfile profile)
- {
- String fileData = "Category,Session Group,Session Item,Count,Average(ms),Total(ms)\r\n";
-
- foreach (KeyValuePair<ProfileConfig, TimingInfo> time in profile.Timers.OrderBy(key => key.Key.Tag))
- {
- fileData += $"{time.Key.Category}," +
- $"{time.Key.SessionGroup}," +
- $"{time.Key.SessionItem}," +
- $"{time.Value.Count}," +
- $"{time.Value.AverageTime / PerformanceCounter.TicksPerMillisecond}," +
- $"{time.Value.TotalTime / PerformanceCounter.TicksPerMillisecond}\r\n";
- }
-
- // Ensure file directory exists before write
- FileInfo fileInfo = new FileInfo(path);
- if (fileInfo == null)
- throw new Exception("Unknown logging error, probably a bad file path");
- if (fileInfo.Directory != null && !fileInfo.Directory.Exists)
- Directory.CreateDirectory(fileInfo.Directory.FullName);
-
- File.WriteAllText(fileInfo.FullName, fileData);
- }
- }
-}