summaryrefslogtreecommitdiffstats
path: root/Tools/PerfSummary/PerfSummary.cs
blob: d957a96b2129d3945928f44230a8a501b0a7bd46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Runtime.CompilerServices;

namespace PerfSummary
{
	internal class Program
	{
		static string getSolutionRoot( [CallerFilePath] string? path = null )
		{
			string? dir = Path.GetDirectoryName( path );
			dir = Path.GetDirectoryName( dir );
			dir = Path.GetDirectoryName( dir );
			return dir ?? throw new ApplicationException();
		}

		static void Main( string[] args )
		{
			string root = getSolutionRoot();
			root = Path.Combine( root, "SampleClips" );

			LogData[] logs = LogParser.parse( root )
				.OrderBy( x => x.name.clip )
				.ThenBy( x => x.name.model )
				.ThenBy( x => x.name.gpu )
				.ToArray();

			Summary.print( logs, root );
		}
	}
}