@@ -97,10 +97,8 @@ public static async Task<FpsResult> StartOnceAsync(FpsRequest request)
97
97
{
98
98
TaskCompletionSource < FpsResult > tcs = new ( ) ;
99
99
FpsResult result = new ( ) ;
100
- Vector < ulong > presentTimestamps = new ( 100 ) ;
101
100
FpsCalculator fps = new ( ) ;
102
101
int pid = ( int ) request . TargetPid ;
103
- Guid dxgKrnlGuid = Microsoft_Windows_DxgKrnl . GUID ;
104
102
TraceEventID presentEventId = ( TraceEventID ) Microsoft_Windows_DxgKrnl . Present_Info . Id ;
105
103
106
104
await Task . Run ( ( ) =>
@@ -139,7 +137,7 @@ void OnDynamicAll(TraceEvent data)
139
137
140
138
/// <see cref="Present"/>
141
139
/// <see cref="Microsoft_Windows_DxgKrnl.Name"/>
142
- if ( data . ProviderGuid == dxgKrnlGuid )
140
+ if ( data . ProviderGuid == Microsoft_Windows_DxgKrnl . GUID )
143
141
{
144
142
if ( data . ID == presentEventId )
145
143
{
@@ -170,10 +168,8 @@ public static async Task StartForeverAsync(FpsRequest request, Action<FpsResult>
170
168
try
171
169
{
172
170
FpsResult result = new ( ) ;
173
- Vector < ulong > presentTimestamps = new ( 100 ) ;
174
171
FpsCalculator fps = new ( ) ;
175
172
int pid = ( int ) request . TargetPid ;
176
- Guid dxgKrnlGuid = Microsoft_Windows_DxgKrnl . GUID ;
177
173
TraceEventID presentEventId = ( TraceEventID ) Microsoft_Windows_DxgKrnl . Present_Info . Id ;
178
174
179
175
using TraceEventSession session = new ( SessionName ) ;
@@ -212,7 +208,7 @@ void OnDynamicAll(TraceEvent data)
212
208
213
209
/// <see cref="Present"/>
214
210
/// <see cref="Microsoft_Windows_DxgKrnl.Name"/>
215
- if ( data . ProviderGuid == dxgKrnlGuid )
211
+ if ( data . ProviderGuid == Microsoft_Windows_DxgKrnl . GUID )
216
212
{
217
213
if ( data . ID == presentEventId )
218
214
{
@@ -269,8 +265,5 @@ public FpsResult() : this(default)
269
265
{
270
266
}
271
267
272
- public override string ToString ( )
273
- {
274
- return $ "FPS: { Fps } ";
275
- }
268
+ public override string ToString ( ) => $ "FPS: { Fps } ";
276
269
}
0 commit comments