import rst2html from "rst2html";
import { baseURL } from "$lib/api";
- let rst;
+ let rst, rstTime;
let complete = false;
onMount(async () => {
+ rstTime = performance.now();
rst = await (await fetch(baseURL)).text();
+ rstTime = performance.now() - rstTime;
complete = true;
});
</script>
<p>Fetching API README...</p>
{:else}
{@html rst2html(rst)}
+ <p>RST to HTML time: {rstTime}ms</p>
{/if}
</section>