Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Show benchmark progress
Browse files Browse the repository at this point in the history
  • Loading branch information
aureleoules committed Jan 3, 2024
1 parent ba4fff2 commit b25c980
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 3 additions & 9 deletions src/routes/[owner]/[repo]/pulls/[number]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,9 @@
</div>
{/if}
<div class="clearfix m-b-base" />
{#if report && report.base_report && report.benchmark_status !== "pending"}
<div
class="cov-container flex flex-justify-between flex-align-start"
>
<div class="cov-col full-width">
<Benchmarks {report} />
</div>
</div>
{/if}
<div class="cov-col full-width">
<Benchmarks {report} />
</div>
{/if}
<div class="clearfix m-b-base" />
</main>
Expand Down
9 changes: 7 additions & 2 deletions src/routes/[owner]/[repo]/pulls/[number]/Benchmarks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export let report: any;
function displayBenchNumber(n, showSign = false) {
if(!n) return 0;
if (!n) return 0;
return Math.round(n).toLocaleString("en-US", {
minimumFractionDigits: 0,
maximumFractionDigits: 0,
Expand All @@ -22,6 +22,7 @@
return r;
}
</script>

<div class="flex">
<h1>
Benchmarks <span class="label label-success">Beta</span>
Expand All @@ -42,7 +43,11 @@
<i class="ri-information-line" /> Benchmarks are currently being generated,
please come back later.
</div>
{:else}
{:else if report.benchmark_status === "failure"}
<div class="alert alert-danger" style="text-align: center">
<i class="ri-information-line" /> An error occured while generating the benchmarks.
</div>
{:else if report.benchmark_status === "success"}
<table class="table">
<thead>
<tr>
Expand Down

0 comments on commit b25c980

Please sign in to comment.