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

Feature: Reading Urls from file #639

Merged
merged 4 commits into from
Dec 22, 2024
Merged

Conversation

chr1st1ank
Copy link
Contributor

Firstly, thanks for this great little tool. It works like a charm and is just what I needed.

I was missing one feature and I'm suggesting it here, please let me know if it is wanted. For now, I've implemented and used it only for myself.

The feature needed was, that the load can be distributed over multiple valid URLs. With the regex feature I would have seen almost only HTTP 404 on the service that I wanted to test. So the idea was to get URLs from a real access log and put them into a file.

This implementation here makes oha:

  • take the filename instead of a single URL
  • read all the lines and validate if they are valid URLs
  • Use random URLs from the list during the load test

The feature is behind the new command line flag --urls-from-file.

What do you think about this?

Copy link
Owner

@hatoo hatoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
It looks good!

I added a small change request.

I'll merge it after your fix.

@chr1st1ank
Copy link
Contributor Author

Thank you! It looks good!

I added a small change request.

I'll merge it after your fix.

Ok, great. I went over the code again to improve the error handling and add some tests. Now it's ready.

@hatoo hatoo merged commit b7166f4 into hatoo:master Dec 22, 2024
@hatoo
Copy link
Owner

hatoo commented Dec 22, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants