We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
nodejs
Learn more about funding links in repositories.
Report abuse
1 parent b40d35d commit 0243376Copy full SHA for 0243376
test/sequential/test-net-bytes-per-incoming-chunk-overhead.js
@@ -17,7 +17,7 @@ const receivedChunks = [];
17
const N = 250000;
18
19
const server = net.createServer(common.mustCall((socket) => {
20
- baseRSS = process.memoryUsage().rss;
+ baseRSS = process.memoryUsage.rss();
21
22
socket.setNoDelay(true);
23
socket.on('data', (chunk) => {
@@ -38,7 +38,7 @@ const server = net.createServer(common.mustCall((socket) => {
38
process.on('exit', () => {
39
global.gc();
40
const bytesPerChunk =
41
- (process.memoryUsage().rss - baseRSS) / receivedChunks.length;
+ (process.memoryUsage.rss() - baseRSS) / receivedChunks.length;
42
// We should always have less than one page (usually ~ 4 kB) per chunk.
43
assert(bytesPerChunk < 650, `measured ${bytesPerChunk} bytes per chunk`);
44
});
0 commit comments