-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Expose internal statValues in a consumer friendly way. #19167
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.wontfixIssues that will not be fixed.Issues that will not be fixed.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.wontfixIssues that will not be fixed.Issues that will not be fixed.
The
fs.statandfs.statSyncmethods have access to an internalstatValuestyped array which holds things like rawmtimeMsvalues. It would be nice to avoid creating an entire stats object for one-off things likemtimeMsand friends.Since Node is already tracking these values in a way that makes it easy to pluck them individually what do you all think about splitting each value out into their own method which then accesses the internal
statValuesarray instead of creating a catch-all for all-values as the stat methods do today?Related: This would also nicely side step the perf issue associated with
stattoo.