I am currently working on designing an API that can take a javaScript as input and tells what are the specific functions this JS will perform like a javascript that loads images or javaScript that uses a particular CSS-Selector for styling. Moreover, with this, the goal is to guess the impact of this javaScript on a particular device in terms of the memory footprint, CPU usage and on the load time of webpage as well.
What I have done is this javaScript. It takes a Har file of a webpage, takes all the scripts from that page, downloads them and try to find the number of times different Identifiers are used. It then generates a CSV file like file this . I know I am still far from my goal, but all I need is some comments that am I going in the right direction?
By the way, some of the results I am found are these:
Any help will be appreciated!