ETWAnalyzer 2.3.3-Preview

This is a prerelease version of ETWAnalyzer.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ETWAnalyzer --version 2.3.3-Preview                
NuGet\Install-Package ETWAnalyzer -Version 2.3.3-Preview                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ETWAnalyzer" Version="2.3.3-Preview" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ETWAnalyzer --version 2.3.3-Preview                
#r "nuget: ETWAnalyzer, 2.3.3-Preview"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ETWAnalyzer as a Cake Addin
#addin nuget:?package=ETWAnalyzer&version=2.3.3-Preview&prerelease

// Install ETWAnalyzer as a Cake Tool
#tool nuget:?package=ETWAnalyzer&version=2.3.3-Preview&prerelease                

Programatic Access to Extracted Data

The IETWExtract interface gives you access to all deserialized data of an extracted Json file in a cohesive object oriented object model. Since ETWAnalyzer was built initially for mass data analysis of automated tests you need to start with a TestRunData instance which gets as input a directory or a Json file. From there you can then query the TestRuns or all contained files. Each TestDataFile has if it adheres to the naming convention the

  • TestCase Name
  • Measured Duration
  • Time when it was taken
  • Machine Name
  • Client/Server
  • Test Status

This is all encoded into the file name which is very fast to query without the need to open any json file. When you want to examine the contents of a Json file you can access of a TestDataFile its Extract property which will deserialize the Json file.

using ETWAnalyzer.Extract;
using ETWAnalyzer.ProcessTools;
using System.Collections.Generic;
using System.Linq;

namespace AutoQuery
{
    internal class Program
    {
        static void Main(string[] args)
        {
            TestRunData data = new TestRunData(args[0]); // read file or a directory with tests
            foreach(TestDataFile test in data.AllFiles)  
            {
                IETWExtract extract = test.Extract; // read Json data
                foreach(KeyValuePair<ProcessKey,uint> topn in extract.CPU.PerProcessCPUConsumptionInMs.Take(10))
                {
                    ColorConsole.WriteEmbeddedColorLine($"[green]{topn.Value,-6} ms[/green] [yellow]{topn.Key,-50}[/yellow]");
                }

            }
        }
    }
}

This very simple application gives you already the top 10 CPU consumers of a file or a directory of files:

alternate text is missing from this package README image

Below is the class Diagram of IETWExtract

alternate text is missing from this package README image

Scalable Json

The main goal of ETWAnalyzer is to make profiling data queryable in a quick manner. On the other hand many additional extractors can be added in the future. If the queried data is small it can be directly added to the main Json extract file. But if the data can be large, such as FILEIO data which records every touched file operation it can become pretty large. To prevent that performance hit a simple way out was chosen. During serialization for potentially large data extracts a different file is used which contains the suffix _Derived_xxxx.json

alternate text is missing from this package README image

These derived files are accessed only when you touch e.g. the FileIO data property. That way we can evolve over time many more extractors with different goals without sacrificing query speed for common things.

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0.11 100 11/20/2024
3.0.0.10 97 7/24/2024
3.0.0.9 102 6/24/2024
3.0.0.8 126 6/14/2024
3.0.0.6 98 5/29/2024
3.0.0.2 149 2/5/2024
3.0.0.1 129 1/30/2024
2.5.15 208 12/7/2023
2.5.14 165 10/6/2023
2.5.13 116 9/26/2023
2.5.11 161 7/26/2023
2.5.8 289 3/23/2023
2.5.5 304 2/2/2023
2.5.3 289 12/23/2022
2.5.2 348 11/8/2022
2.5.1 319 11/8/2022
2.5.0 372 11/3/2022
2.3.3-Preview 137 7/25/2022
2.2.0.4 427 5/9/2022
2.2.0.3 419 5/3/2022
2.2.0.1 412 4/19/2022
2.2.0 410 3/21/2022