Home / Function/ end() — astro Function Reference

end() — astro Function Reference

Architecture documentation for the end() function in timer.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  46c3f783_b0c5_1290_298e_453955b2ba95["end()"]
  90d3bda7_4cb5_4581_6649_981fa38bed51["AstroTimer"]
  46c3f783_b0c5_1290_298e_453955b2ba95 -->|defined in| 90d3bda7_4cb5_4581_6649_981fa38bed51
  style 46c3f783_b0c5_1290_298e_453955b2ba95 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/config/timer.ts lines 43–55

	end(name: string) {
		if (!this.enabled) return;
		const stat = this.ongoingTimers.get(name);
		if (!stat) return;
		globalThis.gc?.();
		const endHeap = process.memoryUsage().heapUsed;
		this.stats[name] = {
			elapsedTime: performance.now() - stat.startTime,
			heapUsedChange: endHeap - stat.startHeap,
			heapUsedTotal: endHeap,
		};
		this.ongoingTimers.delete(name);
	}

Domain

Subdomains

Frequently Asked Questions

What does end() do?
end() is a function in the astro codebase, defined in packages/astro/src/core/config/timer.ts.
Where is end() defined?
end() is defined in packages/astro/src/core/config/timer.ts at line 43.

Analyze Your Own Codebase

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

Try Supermodel Free