Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add importing util to example of `process.report.getReport' #47298

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@ console.log(memoryUsage.rss());
```

```cjs
const { rss } = require('node:process');
const { memoryUsage } = require('node:process');

console.log(memoryUsage.rss());
// 35655680
Expand Down Expand Up @@ -2960,6 +2960,7 @@ present.

```mjs
import { report } from 'node:process';
import util from 'node:util';

const data = report.getReport();
console.log(data.header.nodejsVersion);
Expand All @@ -2971,6 +2972,7 @@ fs.writeFileSync('my-report.log', util.inspect(data), 'utf8');

```cjs
const { report } = require('node:process');
const util = require('node:util');

const data = report.getReport();
console.log(data.header.nodejsVersion);
Expand Down