Skip to content

Commit d8cc712

Browse files
committed
update: remove some unnecessary definitions
1 parent a19e567 commit d8cc712

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/FpsInspector.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,8 @@ public static async Task<FpsResult> StartOnceAsync(FpsRequest request)
9797
{
9898
TaskCompletionSource<FpsResult> tcs = new();
9999
FpsResult result = new();
100-
Vector<ulong> presentTimestamps = new(100);
101100
FpsCalculator fps = new();
102101
int pid = (int)request.TargetPid;
103-
Guid dxgKrnlGuid = Microsoft_Windows_DxgKrnl.GUID;
104102
TraceEventID presentEventId = (TraceEventID)Microsoft_Windows_DxgKrnl.Present_Info.Id;
105103

106104
await Task.Run(() =>
@@ -139,7 +137,7 @@ void OnDynamicAll(TraceEvent data)
139137

140138
/// <see cref="Present"/>
141139
/// <see cref="Microsoft_Windows_DxgKrnl.Name"/>
142-
if (data.ProviderGuid == dxgKrnlGuid)
140+
if (data.ProviderGuid == Microsoft_Windows_DxgKrnl.GUID)
143141
{
144142
if (data.ID == presentEventId)
145143
{
@@ -170,10 +168,8 @@ public static async Task StartForeverAsync(FpsRequest request, Action<FpsResult>
170168
try
171169
{
172170
FpsResult result = new();
173-
Vector<ulong> presentTimestamps = new(100);
174171
FpsCalculator fps = new();
175172
int pid = (int)request.TargetPid;
176-
Guid dxgKrnlGuid = Microsoft_Windows_DxgKrnl.GUID;
177173
TraceEventID presentEventId = (TraceEventID)Microsoft_Windows_DxgKrnl.Present_Info.Id;
178174

179175
using TraceEventSession session = new(SessionName);
@@ -212,7 +208,7 @@ void OnDynamicAll(TraceEvent data)
212208

213209
/// <see cref="Present"/>
214210
/// <see cref="Microsoft_Windows_DxgKrnl.Name"/>
215-
if (data.ProviderGuid == dxgKrnlGuid)
211+
if (data.ProviderGuid == Microsoft_Windows_DxgKrnl.GUID)
216212
{
217213
if (data.ID == presentEventId)
218214
{
@@ -269,8 +265,5 @@ public FpsResult() : this(default)
269265
{
270266
}
271267

272-
public override string ToString()
273-
{
274-
return $"FPS: {Fps}";
275-
}
268+
public override string ToString() => $"FPS: {Fps}";
276269
}

0 commit comments

Comments
 (0)