Skip to content

Proposal to add new endpoint for generic XY #114

@siwei-zhang-work

Description

@siwei-zhang-work

Overview

There has been a need to support a density view in the viewer. Progress on this was previously paused due to the lack of support for views with a non-timestamp X-axis. This proposal aims to see the feasibility for later contributions.

The proposed view

Composition of the view

  1. Right-hand Side: This part of the view is similar to the current density function available in Eclipse, where each bar represents a bin interval. The X-axis in this view is flexible and can represent various metrics, such as duration or frequency, depending on the server's implementation. For example, a category could be a specific range of execution duration, like 20ms–30ms.

Image

  1. Left-hand Side: This section will resemble the XY tree view. An extra panel specifying the description of X-axis and Y-axis can also be here.

Image

Relations with "Time Range Selectors":

The bar chart view would show 2 parts similar to what we already have for segment store statistics with Total and Selected. One part is Total, which refers to the entire trace. And the other part is selected, which refers to [Selection Range Start, Selection Range End] and is affected by the window selected by the user.

Image

Since the bar chart does not have time as the X-axis, zooming in the bar chart view cannot affect the other views.

Example view with selections:

Image

The proposed API

The required API is akin to the existing XY API.

  1. The viewer requests a tree of series
  2. The viewer requests the model of any selected series, the series are selected in the same way as the series in XY view
  3. The viewer visualizes the models as a bar chart

Proposed endpoints

Proposal 1 : a new endpoint for bar chart

- GET (POST) bar category tree
  - viewer request
    - time range
  - server response
    - list of "Y-series"  – Same as `"model"` for XY.
      - id
      - parent id
      - name
      - hasData
      - style
      - labels
      - isDefault
- GET (POST) bar model
  - viewer request
    - time range (no sampling)
    - list of selected entries to provide
  - server response
    - list of series
      - series id
      - series name
      - style
      - Y-Values
      - Y-Axis description
      - X-Values (list of categories)
      - X-Axis description
    - title (this is available in the XY view endpoint, for instance `"title": "Latency vs Time"`)

Other considerations

This view could be extremely slow as it queries all the segments to calculate the counts for each category instead of sampling, so performance needs to be considered when implementing the backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions