-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf_hooks: make performance a global
Signed-off-by: James M Snell <jasnell@gmail.com>
- Loading branch information
Showing
6 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -331,5 +331,6 @@ module.exports = { | |
globalThis: 'readable', | ||
btoa: 'readable', | ||
atob: 'readable', | ||
performance: 'readable', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
/* eslint-disable no-global-assign */ | ||
|
||
require('../common'); | ||
|
||
const perf_hooks = require('perf_hooks'); | ||
const { | ||
strictEqual | ||
} = require('assert'); | ||
|
||
strictEqual(globalThis.performance, perf_hooks.performance); | ||
performance = undefined; | ||
strictEqual(globalThis.performance, undefined); | ||
strictEqual(typeof perf_hooks.performance.now, 'function'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters