Home / File/ render-bench.js — astro Source File

render-bench.js — astro Source File

Architecture documentation for render-bench.js, a javascript file in the astro codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  bc0dd985_37f0_7e6f_1e1b_54d0a5d02137["render-bench.js"]
  2ec933b1_5eb0_6df7_64be_172f9299459c["_util.js"]
  bc0dd985_37f0_7e6f_1e1b_54d0a5d02137 --> 2ec933b1_5eb0_6df7_64be_172f9299459c
  5d6d1861_a18d_b246_cd94_08889ab7e74c["promises"]
  bc0dd985_37f0_7e6f_1e1b_54d0a5d02137 --> 5d6d1861_a18d_b246_cd94_08889ab7e74c
  style bc0dd985_37f0_7e6f_1e1b_54d0a5d02137 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import fs from 'node:fs/promises';
import { loremIpsumHtml, loremIpsumMd } from './_util.js';

// Map of files to be generated and tested for rendering.
// Ideally each content should be similar for comparison.
const renderFiles = {
	'components/ListItem.astro': `\
---
const { className, item, attrs } = Astro.props;
const nested = item !== 0;
---
		<li class={className}>
			<a
				href={item}
				aria-current={item === 0}
				class:list={[{ large: !nested }, className]}
				{...attrs}
			>
				<span>{item}</span>
			</a>
		</li>
	`,
	'components/Sublist.astro': `\
---
import ListItem from '../components/ListItem.astro';
const { items } = Astro.props;
const className = "text-red-500";
const style = { color: "red" };
---
<ul style={style}>
{items.map((item) => (
	<ListItem className={className} item={item} attrs={{}} />
))}
</ul>
	`,
	'pages/astro.astro': `\
---
const className = "text-red-500";
const style = { color: "red" };
const items = Array.from({ length: 10000 }, (_, i) => ({i}));
---
<html>
  <head>
    <title>My Site</title>
  </head>
  <body>
    <h1 class={className + ' text-lg'}>List</h1>
		<ul style={style}>
		{items.map((item) => (
			<li class={className}>
				<a
					href={item.i}
					aria-current={item.i === 0}
					class:list={[{ large: item.i === 0 }, className]}
					{...({})}
				>
					<span>{item.i}</span>
				</a>
			</li>
		))}
// ... (73 more lines)

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does render-bench.js do?
render-bench.js is a source file in the astro codebase, written in javascript. It belongs to the PerformanceBenchmarking domain, ProjectGenerator subdomain.
What functions are defined in render-bench.js?
render-bench.js defines 1 function(s): run.
What does render-bench.js depend on?
render-bench.js imports 2 module(s): _util.js, promises.
Where is render-bench.js in the architecture?
render-bench.js is located at benchmark/make-project/render-bench.js (domain: PerformanceBenchmarking, subdomain: ProjectGenerator, directory: benchmark/make-project).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free