Jwang add resource measurements

3 - The motivation that I split it into two things (query vs. resource) is the additional cost brought by profiling. Although the cost of the query mode (the original profiling we had) has been reduced a lot, there is still some and I tend to avoid it when profiling resources. Similarly, the cost of profiling resource should be less due to the granularity but ideally I hope it's not interfering the other.

2 - I added an "all" option since I thought we might want to profile everything and display them on a single page, but your suggestion also makes sense. I'm okay with just having two separated modes.

1 - Sure, I can change them to uppercase, both ft and profiling modes.