v8-deopt-generate-log
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

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>;

Readme

Keywords

none

Package Sidebar

Install

npm i v8-deopt-generate-log

Weekly Downloads

2

Version

0.2.3

License

MIT

Unpacked Size

7.67 kB

Total Files

4

Last publish

Collaborators

  • drewigg
  • marvinhagemeister