Comments (2)
I think this is something that can be implemented with clj-gatling
out-of-the box. In addition to returning the value directly you can return core.async channel which you can later on write to. Solution looks something like this:
Your clj-gatling
request function.
(defn request []
(let [return-channel (async/chan)
identifier (do-get-request)]
(register-identifier! identifier return-channel)
return-channel)))
So in here I am assuming you have some kind of a way for identifying requests. Later on that can be used to connect them to correct POST responses. For registering you can use for example atom to store. Then you need a http server (e.g. http-kit or Jetty) running in same process. Your post handler should look like this:
(defn post-handler [identifier]
(let [return-channel (get-from-register identifier)]
(>!! return-channel true)))
So in here you get correct return-channel from registry and write the result to that channel.
Does this make sense?
from trombi.
Great suggestion, thank you. I was able to accomplish that without too much trouble.
from trombi.
Related Issues (20)
- An issue with async/timeout HOT 7
- Add scenario pre-hook and post-hook HOT 1
- Simulation with concurrency distribution fails when duration left unspecified HOT 3
- Upgrade http-kit for JDK 9 HOT 6
- Issues with high concurrency HOT 2
- Log timeouts HOT 1
- With uneven scenario weights some scenarios might run with concurrency 0 HOT 1
- clj-time HOT 6
- Steps running serially? HOT 3
- How to identify concurrency issues HOT 7
- Kill a simulation? HOT 2
- Add raw reporter HOT 2
- File based raw reporter does not work when there are less than 20000 requests in simulation
- Catch also AssertionErrors and mark those requests as KOs
- IndexOutOfBoundsException when splitting rate to weighted scenarios HOT 1
- Progress reporter shows negative concurrency values sometimes in the end of the simulation
- Terminate scenario early based on step function return value HOT 1
- Reporters console output is called too early before the results have been calculated
- Concurrency is higher than given in options
- Divide by zero when experimental test runner stats is enabled HOT 2
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 trombi.