Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to ignore query parameters on stats #29

Closed
felipemachado-sambatech opened this issue Jul 12, 2012 · 2 comments
Closed

Option to ignore query parameters on stats #29

felipemachado-sambatech opened this issue Jul 12, 2012 · 2 comments

Comments

@felipemachado-sambatech

My load tests must include many query parameters that are close to random.

I changed the methods on_request_success and on_request_failure to use RequestStats.get(method, name.split('?')[0]) instead, so I could get the stats based on the paths without the query parameters.

I guess this could be useful for many people, so I thought about submitting a patch with an option like --ignore-query-parameters-stats or something, but I thought better to ask here for some tips about where should I add the changes. Should I just do the change as I explained, and add an option for it? Or should I do that up in the call hierarchy?

Thanks!

@Jahaja
Copy link
Member

Jahaja commented Jul 12, 2012

Hi!

You can explicitly name requests using the name parameter.
e.g:

def profile(l):
    l.client.get("/profile?some-query-params=1", name="/profile")

Is this sufficient for your use case?

@felipemachado-sambatech
Copy link
Author

Yes, this is exactly what I need! I hadn't seen that option, sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants