Skip to content

Commit 4646de9

Browse files
committed
feat: display scores
1 parent d942fba commit 4646de9

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/components/Benchmarks/BenchmarkDetail.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ const BenchmarkDetail = ({
8484
stderr={jobData.stderr}
8585
stdout={jobData.stdout}
8686
execDuration={jobData.execDuration}
87+
qualityScore={jobData.qualityScore}
88+
lintScore={jobData.lintScore}
8789
/>
8890
);
8991
}

src/components/Benchmarks/Result.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ interface LayoutProps {
77
stdout?: string;
88
stderr?: string;
99
execDuration?: number;
10+
qualityScore?: number;
11+
lintScore?: number;
1012
}
1113

1214
const Result: React.FC<LayoutProps> = ({
@@ -16,6 +18,8 @@ const Result: React.FC<LayoutProps> = ({
1618
stdout,
1719
stderr,
1820
execDuration,
21+
qualityScore,
22+
lintScore,
1923
}) => {
2024
return (
2125
<div>
@@ -34,6 +38,10 @@ const Result: React.FC<LayoutProps> = ({
3438
<pre>{stderr}</pre>
3539
<b>Execution duration (μs): </b>
3640
<pre>{execDuration}</pre>
41+
<b>Quality score: </b>
42+
<pre>{qualityScore}</pre>
43+
<b>Quality lint: </b>
44+
<pre>{lintScore}</pre>
3745
</div>
3846
);
3947
};

src/hooks/submissions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function useProcessInterval({
4545
onError();
4646
},
4747
onSuccess: (data) => {
48-
setProcessId(data.id);
48+
setProcessId(data.submission.id);
4949
},
5050
});
5151

@@ -63,6 +63,8 @@ function useProcessInterval({
6363
stdout: string;
6464
stderr: string;
6565
execDuration: number;
66+
qualityScore: number;
67+
lintScore: number;
6668
};
6769
} = await authenticatedRequest({
6870
url: `submissions/${processId}`,

0 commit comments

Comments
 (0)