0.2.3 • Published 1 year ago

v8-deopt-generate-log v0.2.3

Weekly downloads
79
License
MIT
Repository
github
Last release
1 year ago

v8-deopt-generate-log

Given a JavaScript file or URL, run the file or webpage and save a log of V8 optimizations and deoptimizations.

Installation

Check out v8-deopt-viewer for a CLI that automates this for you!

Requires NodeJS 14.x or greater.

npm i v8-deopt-generate-log

Also install puppeteer if you plan to generate logs for URLs or HTML files:

npm i puppeteer

Usage

See index.d.ts for the latest API. A snapshot is below.

interface Options {
	/** Path to store the V8 log file. Defaults to your OS temporary directory */
	logFilePath?: string;

	/**
	 * How long the keep the browser open to allow the webpage to run before
	 * closing the browser
	 */
	browserTimeoutMs?: number;
}

/**
 * Generate a V8 log of optimizations and deoptimizations for the given JS or
 * HTML file
 * @param srcPath The path or URL to run
 * @param options Options to influence how the log is generated
 * @returns The path to the generated V8 log file
 */
export async function generateV8Log(
	srcPath: string,
	options?: Options
): Promise<string>;
0.2.3

1 year ago

0.2.2

3 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago