Code Monkey home page Code Monkey logo

Comments (3)

CohenArthur avatar CohenArthur commented on July 29, 2024 3

@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!

from suckit.

pinkforest avatar pinkforest commented on July 29, 2024 2

@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

from suckit.

Skallwar avatar Skallwar commented on July 29, 2024

Self hosted server to avoid network delays

Fixed by #108

from suckit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.