我需要在windows 10中创建一个文件日志模式。为此,我需要在windows 10通用应用程序中创建一个自定义配置文件,以便我可以将默认的日志记录模式从内存更改为file,并更改缓冲区设置。
请帮帮忙。
发布于 2016-05-21 08:55:44
微软在"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\SampleWPRControlProfiles.wprp“中提供了一个WPR演示配置文件。
它展示了如何配置为日志到文件(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>若要验证WPRP文件,请在Visual中打开它,从windowsperformancerecordercontrol.dll和在中加载它中提取最新的在中加载它
XML,然后选择Schemas…Add…。稍后,将WPRP文件与WPR.exe一起使用:
"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\wpr.exe" -start MyProfile.wprp运行您的应用程序并停止录制,运行以下命令:
"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\wpr.exe" -stop Result.etl现在使用WPA.exe或Perfview分析ETL文件。
https://stackoverflow.com/questions/36257307
复制相似问题