Jwang add resource measurements

the `subQueryId` only exists in `resourceUsage` if its profiling mode covers RESOURCE.