Skip to content

Commit 5a4a82b

Browse files
committed
Switch new and old status pages
1 parent 58fa73b commit 5a4a82b

File tree

18 files changed

+868
-870
lines changed

18 files changed

+868
-870
lines changed

site/frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"source": "src/pages/status.ts",
4040
"distDir": "dist/scripts"
4141
},
42-
"status_new": {
43-
"source": "src/pages/status_new.ts",
42+
"status_old": {
43+
"source": "src/pages/status_old.ts",
4444
"distDir": "dist/scripts"
4545
},
4646
"bootstrap": {
Lines changed: 43 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,50 @@
1-
export interface Commit {
2-
sha: string;
3-
date: string;
4-
type: "Try" | "Master";
5-
}
1+
export type BenchmarkRequestType = "Release" | "Master" | "Try";
2+
export type BenchmarkRequestStatus = "Queued" | "InProgress" | "Completed";
63

7-
export interface BenchmarkError {
8-
name: string;
9-
error: string;
10-
}
11-
12-
interface Step {
13-
step: string;
14-
is_done: boolean;
15-
expected_duration: number;
16-
current_progress: number;
17-
}
4+
export type BenchmarkRequest = {
5+
tag: string;
6+
pr: number | null;
7+
status: BenchmarkRequestStatus;
8+
requestType: BenchmarkRequestType;
9+
createdAt: string;
10+
completedAt: string | null;
11+
endEstimated: boolean;
12+
durationS: number | null;
13+
errors: Dict<string>;
14+
};
1815

19-
export type Artifact =
20-
| {
21-
Commit: Commit;
22-
}
23-
| {
24-
Tag: string;
25-
};
16+
export type BenchmarkJobStatus = "Queued" | "InProgress" | "Success" | "Failed";
17+
export type BenchmarkJobKind = "compiletime" | "runtimeInProgress" | "rustc";
2618

27-
export type MissingReason =
28-
| {
29-
Master: {
30-
pr: number;
31-
parent_sha: string;
32-
is_try_parent: boolean;
33-
};
34-
}
35-
| {
36-
Try: {
37-
pr: number;
38-
parent_sha: string;
39-
include: string | null;
40-
exclude: string | null;
41-
runs: number | null;
42-
backends: string | null;
43-
};
44-
}
45-
| {
46-
InProgress: MissingReason;
47-
};
19+
export type BenchmarkJob = {
20+
requestTag: string;
21+
kind: BenchmarkJobKind;
22+
target: string;
23+
backend: string;
24+
profile: string;
25+
benchmarkSet: number;
26+
createdAt: string;
27+
startedAt: string | null;
28+
completedAt: string | null;
29+
status: BenchmarkJobStatus;
30+
dequeCounter: number;
31+
};
4832

49-
interface CurrentState {
50-
artifact: Artifact;
51-
progress: Step[];
52-
}
33+
export type CollectorConfig = {
34+
name: string;
35+
target: string;
36+
benchmarkSet: number;
37+
isActive: boolean;
38+
lastHeartbeatAt: string;
39+
dateAdded: string;
40+
jobs: BenchmarkJob[];
41+
};
5342

54-
export interface FinishedRun {
55-
artifact: Artifact;
56-
pr: number | null;
57-
errors: BenchmarkError[];
58-
duration: number;
59-
finished_at: number;
60-
}
43+
export type StatusResponse = {
44+
requests: BenchmarkRequest[];
45+
collectors: CollectorConfig[];
46+
};
6147

62-
export interface StatusResponse {
63-
finished_runs: FinishedRun[];
64-
current: CurrentState | null;
65-
missing: Array<[Commit, MissingReason]>;
48+
export function isJobComplete(job: BenchmarkJob): boolean {
49+
return job.status === "Failed" || job.status === "Success";
6650
}

0 commit comments

Comments
 (0)