Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedy tsp #73

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions tsp-typescript-client/src/models/timegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export interface TimeGraphEntry extends Entry {
const TimeGraphState = createNormalizer<TimeGraphState>({
end: BigInt,
start: BigInt,
label: assertNumber,
tags: assertNumber,
style: OutputElementStyle,
style: assertNumber,
});

/**
Expand All @@ -50,7 +51,7 @@ export interface TimeGraphState {
/**
* Label to apply to the state
*/
label?: string;
label?: number;

/**
* Tags for the state, used when the state pass a filter
Expand All @@ -60,23 +61,40 @@ export interface TimeGraphState {
/**
* Optional information on the style to format this state
*/
style?: OutputElementStyle;
style?: number;
}

export const TimeGraphRow = createNormalizer<TimeGraphRow>({
styles: array(OutputElementStyle),
entryId: assertNumber,
startTime: BigInt,
states: array(TimeGraphState),
});

/**
* Time graph row described by an array of states for a specific entry
*/
export interface TimeGraphRow {
/**
* Labels for the row
*/
labels: string[];

/**
* Styles for the row
*/
styles: OutputElementStyle[]

/**
* Entry Id associated to the state array
*/
entryId: number;

/**
* Start time of the row
*/
startTime: bigint;

/**
* Array of states
*/
Expand Down