I need to create a file logging mode in windows 10. In order to do this, I need to create a custom profile in windows 10 universal apps so that I may change default logging mode from Memory to File and also change buffer settings.
Please help.
Microsoft provides a demo WPR Profile in "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\SampleWPRControlProfiles.wprp
"
It shows how to configure to log to file (LoggingMode="File"
)
<Profile
Description="Sample profile: File I/O activity"
DetailLevel="Verbose"
Id="MyFileIO.Verbose.File"
LoggingMode="File"
Name="MyFileIO"
>
<ProblemCategories>
<ProblemCategory Value="First Level Triage"/>
</ProblemCategories>
<Collectors>
<SystemCollectorId Value="SystemCollector_FileIO">
<SystemProviderId Value="SystemProvider_FileIO"/>
</SystemCollectorId>
<EventCollectorId Value="EventCollector_KernelPower">
<EventProviders>
<EventProviderId Value="EventProvider_DotNetProvider"/>
<EventProviderId Value="EventProvider_Microsoft-Windows-Kernel-Power_AC-DC-State"/>
</EventProviders>
</EventCollectorId>
</Collectors>
</Profile>
To validate the WPRP file, open it in Visual Studio, extract the latest WPRControlProfiles.xsd from the windowsperformancerecordercontrol.dll and load it in Visual Studio
Open your .wprp file in Visual Studio.
In the main menu, choose XML
, and then choose Schemas
…
In the XML Schemas dialog that appears, choose Add
…
Choose the WPRControlProfiles.xsd schema.
Later use the WPRP file with WPR.exe:
"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\wpr.exe" -start MyProfile.wprp
Run your app and to stop recording run this:
"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\wpr.exe" -stop Result.etl
Now analyze the ETL file with WPA.exe or Perfview.