Giter Site home page Giter Site logo

Comments (4)

eriklupander avatar eriklupander commented on July 22, 2024 1

Hi,

just so I understand you correctly. You would like to be able to do something like this:

actions:
  - http:
      method: GET                                  
      url: http://localhost:8183/courses    
      duration:
        from: 3s500ms
        to: 4s
        exactly: 3s700ms // mutually exclusive with from/to       

If from and to are specified (as Go duration strings), a random duration between from and to is picked, for example 3900ms.

Is your intent that if the actual call to http://localhost:8183/courses takes 1200ms, the action should artificially wait for 3900 - 1200 = 2700 ms in this particular example? If exactly: 3700ms is specified, the action would artificially wait for 3700 -1200 = 2500 ms?

I think the above use-case would be pretty straightforward to implement.

In case the action takes more time than either exactly or from and to, we could control this using a cancellable context.Context set up with WithTimeout in order to halt execution and return an error. This is probably a bit more work to implement properly.

Have I understood your intent correctly? Of course you're free to take a stab at it! I'm not actively working on Gotling, but will of course review and approve PR:s.

from gotling.

eriklupander avatar eriklupander commented on July 22, 2024

Hi,

currently Gotling doesn't support running tests for a fixed period of time. It only supports "iterations". I imagine one could approximate the number of "sleep" actions + service latency to come up with a rough estimate on the duration of a full iteration, and then adjust the number of iterations to get an approximate total duration. That would be quite hackish, though.

Adding a fixed duration as an alternative to a fixed number of iterations should be quite simple though. Feel free to do a pull request :)

Cheers,

// Erik

from gotling.

hakwik avatar hakwik commented on July 22, 2024

Sorry, I'm a bit late to the party, I know.

I too would like to see this, and perhaps more importantly the ability to control the duration of the action iteration (i.e. in addition to sleep, be able to say "this iteration should take 3.5 to 4.5 seconds") to better be able to design closed model workloads.

I don't have Go experience but I'm willing to take a stab at it. What would be your suggested implementation?

from gotling.

hakwik avatar hakwik commented on July 22, 2024

Sorry for my very late response! Yes, you have understood my intent correctly.

The way most traditional closed model load testing tools are implemented, if the duration of the request is greater than the duration of the iteration, the iteration simply becomes as long as the request took to complete. This of course means that you're not meeting your calculated load target in the test, but that can be fine (either it doesn't perform or you've miscalculated somewhere).

I'll try to wrap my head around how Gotling works so I can help out.

from gotling.

Related Issues (13)

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.