Comments (1)
Hi!
Sorry for not replying to this sooner.
In the current master branch of locust (and soon in the 0.6 release), the old HTTP client has been replaced with a small wrapper around python-requests (http://python-requests.org). The events.request_success event has also been modified to not take a response object as argument, but rather the content-length as an integer. So if you're rolling your own client it should now be easy to trigger the request_success event and sending in the length of the response body instead of the content-length header.
We could do this change in the locust code (report the length of response.content instead of the content-length header). However, this would trigger a full body download even if the user has made the request using prefetch=False (http://docs.python-requests.org/en/latest/user/advanced/#body-content-workflow), and I'm not sure if we really want to disable that feature.
One option could be to use the length of response.content unless prefetch is set to False, in which case we try to use the content-length header, and last we fallback to 0. However, this would result in us having two different ways of getting the content size which doesn't seem optimal. Despite this, it might be the solution that would work best in most situations. Any input on this @Jahaja @cgbystrom ?
from locust.
Related Issues (20)
- Modern UI doesn't allow custom parameters HOT 6
- Issue of 100% CPU usage when closing WebSocket connections.
- Update dependency or remove support for Basic Auth for the Web UI
- Add `response.ok` support to `FastHttpUser`'s `FastResponse`, ala `HttpUser`/requests HOT 4
- "Sticky" user types on workers HOT 4
- 在master- worker方式运行下,添加--modern-ui参数,logs页面收集不到worker的日志 HOT 1
- When starting in cluster mode, adding the -- model ui parameter makes it impossible to see the logs of the worker machine on the logs page HOT 1
- K8S Worker adding port 5557 without being specified to
- Vite-version needs to be updated
- Modern UI "forgets" the selected user count and ramp up rate when starting a new test or editing a running one HOT 1
- TaskSet missing _cp_last_run attribute
- ValueError: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 152 from C header, got 40 from PyObject HOT 2
- 95th percentile line chart does not display correctly on the Response Times (ms) graph HOT 3
- POST redirect - custom header not received HOT 7
- GRPC deadlock on startup HOT 1
- Improve the Class Picker HOT 15
- Unifying percentile displays in Locust's statistics screens HOT 6
- Delay at startup and high cpu usage on Windows in Python 3.12 HOT 19
- Docker-Compose Locust UI response time not showing. HOT 6
- Locust performance on windows pretty bad HOT 5
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 locust.