How to create custom wpr profile in windows 10 universal apps

浪尽此生 提交于 2019-12-14 04:01:56

问题


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.


回答1:


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

  1. Open your .wprp file in Visual Studio.

  2. In the main menu, choose XML, and then choose Schemas

  3. In the XML Schemas dialog that appears, choose Add

  4. 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.



来源:https://stackoverflow.com/questions/36257307/how-to-create-custom-wpr-profile-in-windows-10-universal-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!