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

Improve speed regression testing #107

Open
1 of 4 tasks
CohenArthur opened this issue Dec 28, 2020 · 3 comments
Open
1 of 4 tasks

Improve speed regression testing #107

CohenArthur opened this issue Dec 28, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed speed Speed related issue tests Issue related to tests in general

Comments

@CohenArthur
Copy link
Collaborator

CohenArthur commented Dec 28, 2020

  • Add commit hashes to .csv
  • Add computer identifier to rerun all tests on different computers
  • Show improvements as percent % instead of no units
  • Self hosted server to avoid network delays (Use local webserver for speed testing #108)
@CohenArthur CohenArthur added speed Speed related issue tests Issue related to tests in general labels Dec 28, 2020
@Skallwar Skallwar added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 29, 2020
@Skallwar
Copy link
Owner

Self hosted server to avoid network delays

Fixed by #108

@pinkforest
Copy link
Contributor

pinkforest commented Jul 1, 2021

@CohenArthur @Skallwar any specific reason for bringing python and http.server ?

httpmock is rust too and runs either standalone or via API in sync and async context if you wish to decide adopt async later and include it easily within tests.

httpmock runs on hyper (like reqwest) and also features delay setting and I've been pondering contributing there for more network behaviour scenarios.

nginx also would provide sendfile and other optimisations if standalone is still required and it's portable and fast.

nginx also is event based reactor (+prefork) which means no messing with threads while you serve static content but simulating (without breaking portability) delay scenarios and other network blips is harder with limit_req, limit_req_zone, rate=20r/s

Also instead of cloning the linux repo there could be "a seed" setting that readily generates into repeatable data for various test cases as there can be different performance scenarios for tons of small files, large files, error handling etc.

If you are keen I could push a PR

@CohenArthur
Copy link
Collaborator Author

@CohenArthur @Skallwar any specific reason for bringing python and http.server ?

Not really :D It was simple, and this is what the first testing benchmark was originally written in. It would scrape http://books.toscrape.com/ and time it, which was bad for a number of reasons. I am definitely not against functional testing/benchmarking being done in Rust, and I don't think @Skallwar is either.

Also instead of cloning the linux repo there could be "a seed" setting that readily generates into repeatable data for various test cases as there can be different performance scenarios for tons of small files, large files, error handling etc.

The test clones the linux repository in order to benefit from a big folder with known data. We checkout the v5.9 branch so that every test runs against the same content. Seeding it would be interesting, but maybe not for this speedtest specifically.

If you are keen I could push a PR

That would be absolutely fantastic and we'd love it! I believe that we are using some form of HTTP mocking in the tests already, so this would definitely fit. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed speed Speed related issue tests Issue related to tests in general
Projects
None yet
Development

No branches or pull requests

3 participants