microsoft / microsoft/microsoft-performance-toolkit-sdk

SDK should support Specialized Column

Open
#208 0 comments 0 reactions 1 assignee View on GitHub

@mslukebo is already working on this.

Since Sep 7, 2022.

enhancement untriaged
Dominant language
C#
Stars
239
Forks
78
Avg merge
4d 3h
Merged PRs (30d)
2

Description

Overview

The SDK currently defines a column as a conceptual pair of Column Configuration and Projection. When a column is added to a table builder, it is associated with one single projection and one single configuration. However, there are use cases where a column is expected to have special modes – different ways of projecting and displaying the column data – that can be specified and changed at runtime. For example, a process column should be able to display process name only, PID only or both process name and PID. Currently the functionality of extending a column can only be implemented in the SDK driver but not in the plugin because of the lack of support from the SDK. This hinders plugin authors from creating their own column extensions and introduces unwanted plugin-specific code into the SDK driver. To address this, we want to introduce the concept of Specialized Column and add support for creating these columns using the SDK.

Proposed Solution

Functionalities to support
Build a specialized column
  • Create a column extender that provides APIs needed to create a specific column variation and stores a column extension descriptor as the key to identify an extension mode
  • Create a specialized column (regular or hierarchical) that stores a collection of supported column extenders
Add a specialized column to a table
  • Add a specialized column to a table
  • Add new extenders to an already created specialized column
Configure a specialized column
  • Define a set of customized configurable column extension properties associated with a specialized column (e.g. a boolean that specifies whether a specialized hierarchical column should be fold). These properties will be used by the extender to build projection and potentially other column properties. To avoid arbitrary types, we can define an enum of supported "types" of configurable properties and have the properties be of type ExtensionProperty which itself has a property of this enum
  • Create an extended column configuration that specifies an extension mode and the properties values associated with the specialized column
Code sample with new types and APIs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.