I am trying to optimize a project and would like to analyze how efficient the project is by looking at I/O. The project only affects files and directories in a local directory which makes things a little simpler. Assuming that the fewer the number of I/O operations (let's go with this for the moment), the better, is there a way to monitor or simply get a count of all filesystem operations from when a process A starts to when process A ends? Are there tools that allow you to do this? I am on MacOS, but would be looking to get something to work on either *nix or MacOS.
How to do this right? How to analyze performance of application based off of local filesystem I/O?
This happens to be a node.js application (not a server though)