Skip to content

Commit 1ebf9e2

Browse files
committed
feat(submissions): add execution duration support
1 parent c27a3aa commit 1ebf9e2

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

src/components/Benchmarks/BenchmarkDetail.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const BenchmarkDetail = ({
8080
status={jobData.status}
8181
stderr={jobData.stderr}
8282
stdout={jobData.stdout}
83+
execDuration={jobData.execDuration}
8384
/>
8485
);
8586
}

src/components/Dashboard/Dashboard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default function Example() {
3232
status={jobData.status}
3333
stdout={jobData.stdout}
3434
stderr={jobData.stderr}
35+
execDuration={jobData.execDuration}
3536
></Result>
3637
);
3738
}

src/components/Dashboard/Result.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ interface LayoutProps {
44
status: string;
55
stdout?: string;
66
stderr?: string;
7+
execDuration?: number;
78
}
89

9-
const Result: React.FC<LayoutProps> = ({ status, stdout, stderr }) => {
10+
const Result: React.FC<LayoutProps> = ({
11+
status,
12+
stdout,
13+
stderr,
14+
execDuration,
15+
}) => {
1016
return (
1117
<div>
1218
<b>Status: </b>
@@ -16,6 +22,8 @@ const Result: React.FC<LayoutProps> = ({ status, stdout, stderr }) => {
1622
<pre>{stdout}</pre>
1723
<b>Stderr: </b>
1824
<pre>{stderr}</pre>
25+
<b>Execution duration (milliseconds): </b>
26+
<pre>{execDuration}</pre>
1927
</div>
2028
);
2129
};

src/hooks/submissions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function useProcessInterval({
5858
status: string;
5959
stdout: string;
6060
stderr: string;
61+
execDuration: number;
6162
};
6263
} = await authenticatedRequest({
6364
url: `submissions/${processId}`,

0 commit comments

Comments
 (0)