Query parameter

In this PR, we allow api users to specify how many stats/samples they want to retrieve and also let them to specify which percentile of CPU/Memory usage they want to retrieve.