Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions site/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"source": "src/pages/status.ts",
"distDir": "dist/scripts"
},
"status_new": {
"source": "src/pages/status_new.ts",
"status_old": {
"source": "src/pages/status_old.ts",
"distDir": "dist/scripts"
},
"bootstrap": {
Expand Down
102 changes: 43 additions & 59 deletions site/frontend/src/pages/status/data.ts
Original file line number Diff line number Diff line change
@@ -1,66 +1,50 @@
export interface Commit {
sha: string;
date: string;
type: "Try" | "Master";
}
export type BenchmarkRequestType = "Release" | "Master" | "Try";
export type BenchmarkRequestStatus = "Queued" | "InProgress" | "Completed";

export interface BenchmarkError {
name: string;
error: string;
}

interface Step {
step: string;
is_done: boolean;
expected_duration: number;
current_progress: number;
}
export type BenchmarkRequest = {
tag: string;
pr: number | null;
status: BenchmarkRequestStatus;
requestType: BenchmarkRequestType;
createdAt: string;
completedAt: string | null;
endEstimated: boolean;
durationS: number | null;
errors: Dict<string>;
};

export type Artifact =
| {
Commit: Commit;
}
| {
Tag: string;
};
export type BenchmarkJobStatus = "Queued" | "InProgress" | "Success" | "Failed";
export type BenchmarkJobKind = "compiletime" | "runtimeInProgress" | "rustc";

export type MissingReason =
| {
Master: {
pr: number;
parent_sha: string;
is_try_parent: boolean;
};
}
| {
Try: {
pr: number;
parent_sha: string;
include: string | null;
exclude: string | null;
runs: number | null;
backends: string | null;
};
}
| {
InProgress: MissingReason;
};
export type BenchmarkJob = {
requestTag: string;
kind: BenchmarkJobKind;
target: string;
backend: string;
profile: string;
benchmarkSet: number;
createdAt: string;
startedAt: string | null;
completedAt: string | null;
status: BenchmarkJobStatus;
dequeCounter: number;
};

interface CurrentState {
artifact: Artifact;
progress: Step[];
}
export type CollectorConfig = {
name: string;
target: string;
benchmarkSet: number;
isActive: boolean;
lastHeartbeatAt: string;
dateAdded: string;
jobs: BenchmarkJob[];
};

export interface FinishedRun {
artifact: Artifact;
pr: number | null;
errors: BenchmarkError[];
duration: number;
finished_at: number;
}
export type StatusResponse = {
requests: BenchmarkRequest[];
collectors: CollectorConfig[];
};

export interface StatusResponse {
finished_runs: FinishedRun[];
current: CurrentState | null;
missing: Array<[Commit, MissingReason]>;
export function isJobComplete(job: BenchmarkJob): boolean {
return job.status === "Failed" || job.status === "Success";
}
Loading
Loading