如何使用System.Diagnostics.Tracing在C#中读取.etl文件? [英] How to read .etl files in C# using System.Diagnostics.Tracing?

查看:103
本文介绍了如何使用System.Diagnostics.Tracing在C#中读取.etl文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试读取和解析在C#中使用xperf生成的.etl文件。 (Windows 7 / .Net framework 4.6.2)

I am trying to read and parse .etl file generated with xperf in C#. (Windows 7 / .Net framework 4.6.2)

推荐答案

您好KnowCrazy.com,

Hi KnowCrazy.com,

感谢您的支持在这里发布。

Thank you for posting here.

根据我的搜索,我找不到使用C#直接读取它的方法。您可以将.etl转换为.csv文件,然后将其读取。

Based on my search, I do not find the way to read it directly using C#. You could convert .etl to .csv file and then read it.

对于示例,您可以参考以下链接。

For the examples you could refer to the following link.

https://stackoverflow.com/questions/6164961/how-do-i-read -etl-files-in-net

如果您想阅读.etl文件,可以使用
Log Parser
。  日志解析器是一个功能强大的多功能工具,可以对基于文本的数据(如日志文件,XML文件和CSV文件)以及
Windows操作系统(如事件日志)上的关键数据源提供通用查询访问。注册表,文件系统和Active Directory。

If you want to read .etl files, you could use Log ParserLog parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory.

这是一个与您类似的线程供您参考。它显示了示例。

https://social.msdn.microsoft.com/Forums/vstudio/en-US/e2c2f9b5 -210e-457a-b2b4-7ff66e0620bb / how-do-do-extract-information-from-etl-files-in-net?forum = csharpgeneral

最诚挚的问候,

Wendy


这篇关于如何使用System.Diagnostics.Tracing在C#中读取.etl文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆