Comments (4)
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.
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.
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.
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)
- update README about how to build from source code HOT 3
- Broken builds. HOT 4
- [Question] Open to PRs? HOT 2
- 1000 request/sec example HOT 2
- Getting error HTTP request failed: connect: cannot assign requested address HOT 2
- Gotling opening up new TCP connection for each request HOT 1
- RFC - accept response by ignore the body HOT 2
- RFC - accept xml content HOT 3
- evaluate and use fasthttp HOT 8
- Add support for file-based templates HOT 1
- Example for session sensitive stress test HOT 2
- Host request-header Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotling.