Skip to content

Commit 94f415a

Browse files
authored
Update existing documentation and add glossary file (#186)
* Slight edits to existing documents and add glossary * Combine sentences * Address more comments * Address feedback * Grammar * Fix now-dead link * Alphabetize
1 parent 3c09525 commit 94f415a

File tree

5 files changed

+221
-39
lines changed

5 files changed

+221
-39
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ For help with getting started and developing SDK plugins, refer to the [document
2929

3030
## Projects in the SDK Solution
3131
* `Microsoft.Performance.SDK`: Software library for building SDK plugins
32-
* `Microsoft.Performance.SDK.Runtime`: Runtime for loading and processing data from plugins
33-
* `Microsoft.Performance.SDK.Runtime.NetCoreApp`: .NET Core version of `Microsoft.Performance.SDK.Runtime`
32+
* `Microsoft.Performance.SDK.Runtime`: Runtime for loading and processing data from plugins. Plugins should not depend on this library
33+
* `Microsoft.Performance.SDK.Runtime.NetCoreApp`: .NETCore-specific functionality of `Microsoft.Performance.SDK.Runtime`
3434
* `Microsoft.Performance.SDK.Toolkit.Engine`: Interface for programmatically manipulating, cooking, and accessing data from SDK plugins
3535
* `Microsoft.Performance.SDK.Tests`: Tests for `Microsoft.Performance.SDK`
3636
* `Microsoft.Performance.SDK.Runtime.Tests`: Tests for `Microsoft.Performance.SDK.Runtime`
3737
* `Microsoft.Performance.SDK.Runtime.NetCoreApp.Tests`: Tests for `Microsoft.Performance.SDK.Runtime.NetCoreApp`
3838
* `Microsoft.Performance.SDK.Toolkit.Engine.Tests`: Tests for `Microsoft.Performance.SDK.Toolkit.Engine`
39-
* `Microsoft.Performance.SDK.Testing`: *description coming soon*
40-
* `Microsoft.Performance.SDK.Testing.SDK`: *description coming soon*
39+
* `Microsoft.Performance.SDK.Testing`: General utilities for authoring tests
40+
* `Microsoft.Performance.SDK.Testing.SDK`: SDK-specific utilities for authoring tests
4141
* `PluginConfigurationEditor`: *description coming soon*
4242

4343
## Known SDK Driver Plugin Compatibility
@@ -46,6 +46,10 @@ This repository tracks which versions of the SDK are compatibile with certain SD
4646

4747
This information is listed in the [known SDK driver compatibility lists](./documentation/Known-SDK-Driver-Compatibility/Overview.md) document.
4848

49+
## Getting Started
50+
51+
Refer to the [documentation folder](./documentation/Overview.md) for help with creating SDK plugins.
52+
4953
## Coming Soon
5054

5155
Team is actively working to provide better documentation, more samples, and several in-depth tutorials.

documentation/Glossary.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
# Glossary
2+
3+
* [AboutInfo](#aboutinfo)
4+
* [Column](#column)
5+
* [ColumnConfiguration](#columnconfiguration)
6+
* [ColumnRole](#columnrole)
7+
* [CompositeDataCooker](#compositedatacooker)
8+
* [CustomDataProcessor](#customdataprocessor)
9+
* [DataCooker](#datacooker)
10+
* [DataSource](#datasource)
11+
* [DynamicTable](#dynamictable)
12+
* [Pivot Column](#pivot-column)
13+
* [Pivot Table](#pivot-table)
14+
* [Plugin](#plugin)
15+
* [Processing Pipeline](#processing-pipeline)
16+
* [ProcessingSource](#processingsource)
17+
* [Projection](#projection)
18+
* [SDK Driver](#sdk-driver)
19+
* [Simple Table](#simple-table)
20+
* [SourceDataCooker](#sourcedatacooker)
21+
* [SourceParser](#sourceparser)
22+
* [Special Columns](#special-columns)
23+
* [Table](#table)
24+
* [TableBuilder](#tablebuilder)
25+
* [Table Building Cycle](#table-building-cycle)
26+
* [TableCommand](#tablecommand)
27+
* [TableConfiguration](#tableconfiguration)
28+
* [VisibleDomainSensitiveProjection](#visibledomainsensitiveprojection)
29+
* [Windows Performance Analyzer](#windows-performance-analyzer)
30+
31+
---
32+
33+
## AboutInfo
34+
35+
Exposes information about a plugin, such as its authors, copyright, and license. See [Adding About Information](./Using-the-SDK/Advanced/Adding-About-Information.md).
36+
37+
## Column
38+
39+
A ([ColumnConfiguration](#columnconfiguration), [Projection](#projection)) pair that defines data inside a [Table](#table).
40+
41+
See also: [Special Columns](#special-columns)
42+
43+
## ColumnConfiguration
44+
45+
Information about a column of a [Table](#table). Contains the column's name, metadata, and [UIHints](#uihints).
46+
47+
See also: [Projection](#projection).
48+
49+
## ColumnRole
50+
51+
Meta-information about a [Column](#column) that defines the Column's role in data presentation. For example, a Column that contains a `Timestamp` whose value indicates when an event occured relative to the start of a [DataSource](#datasource) may be marked as a "start time" Column.
52+
53+
## CompositeDataCooker
54+
55+
A [DataCooker](#datacooker) that receives input solely from other DataCookers.
56+
57+
## CustomDataProcessor
58+
59+
Component responsible for processing a [DataSource](#datasource). For example, a CustomDataProcessor may be responsible for parsing lines in a `.txt` file into `LineItem` objects that later get consumed by a [DataCooker](#datacooker) or [Table](#table).
60+
61+
In most situations, a CustomDataProcessor will further delegate the responsibility of processing a DataSource to a [SourceParser](#sourceparser).
62+
63+
A CustomDataProcessor is responsible for building any [Simple Tables](#simple-table) discovered by the [ProcessingSource](#processingsource) that created it.
64+
65+
## DataCooker
66+
67+
Component of a [Processing Pipeline](#processing-pipeline) that consumes data from one or more sources and optionally outputs new data for other components to consume. Conceptually, a DataCooker "cooks" data from one type to another.
68+
69+
See also: [SourceDataCooker](#sourcedatacooker) and [CompositeDataCooker](#compositedatacooker).
70+
71+
## DataSource
72+
73+
An input to be processed by a [CustomDataProcessor](#customdataprocessor). In most situations, this is a `FileDataSource` that contains the full path to a file specified by a user.
74+
75+
## DynamicTable
76+
77+
A [Table](#table) that is built outside of the standard [table building cycle](#table-building-cycle). DynamicTables are commonly built in response to a [TableCommand](#tablecommand) being invoked.
78+
79+
## Pivot Column
80+
81+
NOTE: (Not to be confused with the [Special Column](#special-columns) `PivotColumn`)
82+
83+
A special type of [Column](#column) that should be pivoted about when its [Table](#table) is interpreted as a [Pivot Table](#pivot-table). Any Column that appears in a [TableConfiguration](#tableconfiguration) before the `PivotColumn` is a Pivot Column.
84+
85+
## Pivot Table
86+
87+
A representation of a [Table](#table) where certain [Columns](#column) are pivoted/grouped about. For example, consider this table with 5 rows:
88+
89+
| State | Zip Code | Population |
90+
|--------------|----------|------------|
91+
| Washington | 98052 | 65,558 |
92+
| New York | 10023 | 60,998 |
93+
| Washington | 98101 | 13,877 |
94+
| Washington | 98109 | 20,715 |
95+
| New York | 10025 | 94,600 |
96+
97+
If the "State" column above is a [Pivot Column](#pivot-column), the 5 rows would be grouped into the following Pivot Table:
98+
99+
| State | Zip Code | Population |
100+
|--------------|----------|------------|
101+
| > Washington | | |
102+
| | 98052 | 65,558 |
103+
| | 98101 | 13,877 |
104+
| | 98109 | 20,715 |
105+
| > New York | | |
106+
| | 10023 | 60,998 |
107+
| | 10025 | 94,600 |
108+
109+
NOTE: the SDK has no understanding of Pivot Tables. Tables created by a plugin are purely "flat" tables - i.e. tables similar the first one above. It is up to programs like [Windows Performance Analyzer](#windows-performance-analyzer) to use pivot information in a [Table Configuration](#tableconfiguration) to present a plugin's Table as a Pivot Table.
110+
111+
## Plugin
112+
113+
A collection of one-or-more [ProcessingSources](#processingsource) that collectively create zero-or-more [Tables](#table) and consist of zero-or-more [DataCookers](#datacooker).
114+
115+
## Processing Pipeline
116+
117+
A collection of [DataCookers](#datacooker) and [SourceParsers](#sourceparser) that define a structured flow of data.
118+
119+
## ProcessingSource
120+
121+
An entrypoint for a [Plugin](#plugin). A ProcessingSource
122+
1. Declares a human-readable name and description
123+
2. Defines the [DataSource(s)](#datasource) it supports
124+
3. Creates the [CustomDataProcessor](#customdataprocessor) that will process instances of supported DataSources
125+
4. Advertises the [Table(s)](#table) that may be built in response to DataSources being processed
126+
127+
## Projection
128+
129+
A function that maps a row index for a [Table](#table) to a piece of data. Conceptually, a Projection is combined with a [ColumnConfiguration](#columnconfiguration) to complete define a Table's [Column](#column): the ColumnConfiguration defines the name and metadata about a Column, and its associated Projection defines the Column's data.
130+
131+
## SDK Driver
132+
133+
A program that utilizes the SDK and SDK plugins to process [Data Sources](#datasource) and present information to users.
134+
135+
See also: [Windows Performance Analyzer](#windows-performance-analyzer).
136+
137+
## Simple Table
138+
139+
A [Table](#table) variant that cannot participate in a [Processing Pipeline](#processing-pipeline) and must be built by a [CustomDataProcessor](#customdataprocessor). Simple Tables should only be used if your plugin does not use [DataCookers](#datacooker). However, since in most data-processing situations it is recommended to use DataCookers to architect your data-processing, it is recommended to use only standard [Tables](#table).
140+
141+
## SourceDataCooker
142+
143+
A [DataCooker](#datacooker) that receives input from a specific [SourceParser](#sourceparser). A SourceDataCooker may also receive input from other DataCookers of the same SourceParser.
144+
145+
## SourceParser
146+
147+
An object that a [CustomDataProcessor](#customdataprocessor) typically tasks with parsing a [DataSource](#datasource) into individual records. The records that a SourceParser emits typically begin a [Processing Pipeline](#processing-pipeline), wherein [DataCookers](#datacooker) further process data to be consumed by [Tables](#table).
148+
149+
## Special Columns
150+
151+
Columns that all [Tables](#table) may use in their [TableConfiguration](#tableconfiguration) and denote special behavior. These columns are
152+
* `PivotColumn`: a column that marks the end of columns which should be pivoted about. All columns in a Table that appear before this Special Column are interpreted as [Pivot Columns](#pivot-column)
153+
* `GraphColumn`: a column that marks the start of columns that can/should be graphed
154+
* `LeftFreezeColumn`: a column that marks the end of columns that should be frozen in GUIs
155+
* `RightFreezeColumn`: a column that marks the start of columns that should be frozen in GUIs
156+
157+
## Table
158+
159+
A collection of one-or-more columns that contain data. Each column of a Table must consist of the same number of rows.
160+
161+
A Table may receive data from one-or-more [DataCookers](#datacooker). A Table is also responsible for "building itself" by having a static `Build` method interacts with a [TableBuilder](#tablebuilder).
162+
163+
## TableBuilder
164+
165+
The object used to concretely construct [Tables](#table) and [Simple Tables](#simple-table). When a [CustomDataProcessor](#customdataprocessor) is asked to build a Simple Table, or when a normal Table "builds itself," it will be given an instance of an `ITableBuilder` to add its [Columns](#column) and [TableConfigurations](#tableconfiguration) to.
166+
167+
## Table Building Cycle
168+
169+
The standard process used to construct [Tables](#table). This process involves
170+
1. A user specifying which [DataSource(s)](#datasource) to process
171+
2. [CustomDataProcessor(s)](#customdataprocessor) being given the selected DataSources to process
172+
3. [Simple Tables](#simple-table) being built by these CustomDataProcessor(s)
173+
4. [DataCooker(s)](#datacooker) further processing data produced by any [SourceParsers](#sourceparser) used by the CustomDataProcessor(s) referenced above
174+
5. [Tables](#table) "building themselves" from the data produced by these DataCookers.
175+
176+
## TableCommand
177+
178+
An action that can be called on a [Table](#table). Concretely, a TableCommand is a `string => Func` key-value pair where the key is the TableCommand's name and the value is a function to be called when the TableCommand is invoked.
179+
180+
A common use-case of TableCommands is creating [DynamicTables](#dynamictable)
181+
182+
## TableConfiguration
183+
184+
A pre-defined collection of properties for a [Table](#table). This includes, but is not limited to,
185+
* The order of [Columns](#column) in the Table
186+
* An initial filter to apply to the Table
187+
* [ColumnRoles](#columnrole) for Columns in the table
188+
189+
## VisibleDomainSensitiveProjection
190+
191+
A [Projection](#projection) that depends upon the visible subrange of values spanned by the Projection's [Table](#table)'s domain. For example, if a Table's domain is time-based (e.g. `Timestamp`-based), a VisibleDomainSensitiveProjection could be a Projection that reports the percent of time spent inside a method call _relative to the timerange currently visible to the user_.
192+
193+
## Windows Performance Analyzer
194+
195+
An [SDK Driver](#sdk-driver) that can display [Tables](#table) plugins create as [Pivot Tables](#pivot-table) and graph data in various formats.

documentation/Overview.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
# Abstract
1+
# Overview
22
The Microsoft Performance Toolkit SDK allows developers to create "SDK plugins" that process and interpret data.
33
These plugins can be used by performance analysis applications that use the SDK runtime - such as [Windows Performance Analyzer](https://docs.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-analyzer) - to process data sources into structured, tabular data. Plugins may utilize the SDK's data-processing pipeline to both facilitate the creation of these tables and expose data that can be programmatically accessed by concurrently loaded plugins (even those without access to the originating plugin's source code).
44

55
This folder contains instructions for developing SDK plugins and utilizing the SDK's various features.
66

7+
# Glossary
8+
9+
For quick definitions/examples of terms and concepts, refer to the [Glossary](./Glossary.md).
10+
711
# Requirements
812
The following are required in order to develop an SDK plugin:
913
* [NuGet](https://www.nuget.org/downloads)
1014
* [.NET Standard 2.0](https://dotnet.microsoft.com/download/visual-studio-sdks)
1115
* A text editor (for editing your source code)
1216

13-
It is recommended to use [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) to develop an SDK plugin since it satisfies all three requirements. Future documentation assumes the use of Visual Studio, but the instructions may be adapted for other editors/IDEs.
17+
It is recommended to use [Visual Studio](https://visualstudio.microsoft.com/downloads/) to develop an SDK plugin since it satisfies all three requirements. Future documentation assumes the use of Visual Studio, but the instructions may be adapted for other editors/IDEs.
1418

1519
# Getting the SDK
16-
The SDK is currently published as a NuGet package under the name [Microsoft.Performance.SDK](https://www.nuget.org/packages/Microsoft.Performance.SDK/).
20+
The SDK is published as a NuGet package under the name [Microsoft.Performance.SDK](https://www.nuget.org/packages/Microsoft.Performance.SDK/).
1721
Since it is hosted on [NuGet.org](https://www.nuget.org/), it can be added to a `csproj` with no additional configuration by using
1822
the Visual Studio NuGet Package Manager, `dotnet.exe`, or `nuget.exe`.
1923

20-
# Creating Your First Project
21-
Please see the [Creating your first project](Using-the-SDK/Creating-your-project.md)
24+
# Creating Your First Plugin
25+
Refer to [Creating your first plugin](Using-the-SDK/Creating-your-plugin.md)
2226

2327
# Recommended Reading Order
2428
To best understand how the SDK works and how to develop SDK plugins, it is recommended to read documentation in the following order:
25-
1) [Architecture/Overview](./Architecture/Overview.md) to understand at a high level the various system the SDK provides
29+
1) [Architecture/Overview](./Architecture/Overview.md) to understand at a high level the various systems the SDK provides
2630
2) [Architecture/The Data Processing Pipeline](./Architecture/The-Data-Processing-Pipeline.md) to understand how to systematically process data that
2731
can be used by tables
2832
3) [Using the SDK/Creating an SDK Plugin C# Project](Using-the-SDK/Creating-your-project.md) to get your developer environment ready to create an SDK plugin

documentation/Using-the-SDK/Creating-your-project.md renamed to documentation/Using-the-SDK/Creating-your-plugin.md

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,24 @@ This document will cover:
1010

1111

1212

13-
For simplicity, this section will assume you are using Visual Studio 2019. The instructions may be adapted for other editors / IDEs.
13+
For simplicity, this section will assume you are using Visual Studio. The instructions may be adapted for other editors / IDEs.
1414

1515
<a name="reqs"></a>
1616
# Requirements
1717

18-
1. [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/)
18+
1. [Visual Studio](https://visualstudio.microsoft.com/downloads/)
1919
2. [.NET SDK that supports .NET Standard 2.0](https://dotnet.microsoft.com/download/visual-studio-sdks)
2020
* [See .NET Standard 2.0 support options](https://docs.microsoft.com/en-us/dotnet/standard/net-standard)
2121

22-
## Visual Studio 2019
23-
24-
You can install Visual Studio 2019 from here: [https://visualstudio.microsoft.com/downloads/](https://visualstudio.microsoft.com/downloads/).
25-
Any edition is capable of creating an SDK plugin.
26-
27-
1. Download the installer
28-
2. Execute the installer
29-
3. Make sure that the following features are selected:
30-
* .NET Desktop Development (Make sure to select an appropriate .NET SDK for development option)
31-
4. Click "Install"
32-
5. You may have to restart your computer when installation finishes
33-
34-
## .NET Standard 2.0
35-
36-
If you installed Visual Studio 2019 based on the above instructions, then you are good to go. Otherwise,
37-
38-
1. Execute your VS2019 installer, and choose to "Modify" the installation
39-
2. Make sure that the following features are selected:
40-
* .NET Desktop Development (Should include an appropriate .NET SDK for .NET Standard 2.0)
41-
3. Click "Modify" to modify your installation
42-
4. You may need to restart your computer when modification finishes
43-
4422
<a name="createproj"></a>
4523
# Creating Your Project
4624

47-
1) Launch Visual Studio 2019
25+
1) Launch Visual Studio
4826
2) Click "Create new project"
4927
![VS2019_Create_New_Project.PNG](./.attachments/VS2019_CreateProject_Markup.png)
5028
3) Select .NET Standard on the left, and choose "Class Library (.NET Standard)." Make sure that you are using .NET Standard 2.0
5129
![VS2017_New_DotNetStandard_20_Project.PNG](./.attachments/VS2019_CreateProject_ClassLibrary_Markup.png)
52-
4) Give your project whatever name you want
30+
4) Name your project
5331
5) Click "Create"
5432

5533
<a name="configure"></a>
@@ -75,10 +53,11 @@ Please see [Using the SDK/Installing WPA](./Installing-WPA.md) for more informat
7553

7654
1) Right click your project and select "Properties"
7755
2) Select the "Debug" tab on the left
56+
* In newer versions of Visual Studio, you may need to click "Open debug launch profiles UI"
7857
3) For "Launch", select "Executable"
7958
4) For the "Executable", place the path to the `wpa.exe` that you previously installed as part of the WPT
80-
* Typically this might be: `C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\wpa.exe`
81-
5) For "Command line Arguments", add `-addsearchdir <bin folder for your plug-in>` (e.g. `-addsearchdir C:\MyAddIn\bin\Debug\netstandard2.1`)
59+
* Typically this might be: `C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\wpa.exe`
60+
5) For "Command line Arguments", add `-addsearchdir <bin folder for your plugin>` (e.g. `-addsearchdir C:\MyAddIn\bin\Debug\netstandard2.1`)
8261

8362
# Next Steps
8463

documentation/Using-the-SDK/Installing-WPA.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ WPA is bundled as part of the [Windows Performance Toolkit](https://docs.microso
1111
- Download and run the setup program for the Windows Assessment and Deployment Kit.
1212
- Chose an installation path and follow installation insructions until you reach the "Select the features you want to install" screen.
1313
* Take note of the installation path as it will be used when debugging SDK plugin projects.
14-
- Make sure to select "Windows Performance Toolkit" from this screen. ![ADK_Installation_Markup.png](/.attachments/ADK_Installation_Markup.png)
14+
- Make sure to select "Windows Performance Toolkit" from this screen. ![ADK_Installation_Markup.png](./.attachments/ADK_Installation_Markup.png)
1515
- Click "Install and Close" when installation is complete.

0 commit comments

Comments
 (0)