Closed LucaFranceschini closed 5 years ago
Not yet, it should be something you can implement yourself, or you can simply log with an analysis-specific header to grep with.
Not yet, it should be something you can implement yourself, or you can simply log with an analysis-specific header to grep with.
I can implement the parsing by myself, what is not clear to me is what part of NodeProf I should modify to actually pass the arguments array to the analysis. Do you have any suggestion?
Thanks.
Ok. Then it should be loadAnalysis as you found out. Currently, it only processes --analysis jalangiAnalysis
. We can add one more option, e.g., "--analysisOpts XXXX" (where XXXX can be a string separated by some delimiter) and then store the extra arguments in J$.initParams as Jalangi does.
I can work on this when I will have time, or if you have some patch already, feel free to start a PR.
That's fine. If I understand correctly, that would pass the same list of arguments to every analysis, correct? J$
seems global so if I set J$.initParams
in loadAnalysis
arguments are the same for every analysis.
Yes, they are global as J$ is global.
We can keep it like Jalangi:
https://github.com/Samsung/jalangi2/blob/master/src/js/commands/direct.js#L30
where they use --initParam
and store it in J$.initParam as a global as well.
Jalangi supports CLI arguments that end up in
J$.initParams
. Does NodeProf support anything similar? It would be useful for instance to tell the analysis where to log events.I didn't dig too much into the code here, maybe it should be in
loadAnalysis
?