This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1282|Reply: 0

Windows uses k6 for HTTP stress testing

[Copy link]
Posted on 2025-3-17 15:31:01 | | | |
Requirements: Stress test the interface using K6.

review

The Cassowary tool for HTTP request stress testing
https://www.itsvse.com/thread-10557-1-1.html

Comparison of the testing tools LoadRunner and Jmeter
https://www.itsvse.com/thread-10172-1-1.html

Stress test using Apache's ab tool
https://www.itsvse.com/thread-4410-1-1.html

windows Apache ab web site stress test
https://www.itsvse.com/thread-4836-1-1.html

k6 tool

The K6 is a modern load testing tool built on our years of experience in the performance and test industry. It's powerful, scalable, and feature-packed. Its main design goal is to provide the best developer experience.

Its core features are:

Configurable load generation. Even low-end machines can simulate large volumes of traffic.
Test as code. Reuse scripts, modular logic, version control, and integrate tests with CI.
Full-featured API. The Scripting API includes a variety of features to help you simulate real application traffic.
Embedded JavaScript engine. Go performance, JavaScript script familiarity.
Multi-protocol support. HTTP, WebSockets, gRPC, browsers, etc.
Large scaling ecosystem. You can extend the k6 to meet your needs. Many have already shared their expansions with the community!
Flexible metrics storage and visualization. Aggregate statistics or fine-grained metrics and export them to the service of your choice.
Native integration with Grafana cloud. SaaS solutions for test execution, metric correlation, data analysis, and more.

This is load testing for the 21st century.

Documentation:The hyperlink login is visible.
Source code address:The hyperlink login is visible.
Download for Windows:The hyperlink login is visible.

Test

Create a new test.js configuration script with the following code:


Run the test, command:




Output detailed explanation

  • scenarios: Briefly describe the running of the test script; Describe how many test cases, the largest number of virtual users, and the maximum run duration.
  • data_received: The amount of data received
  • data_sent: The amount of data sent
  • http_req_blocked: The time that was blocked before initiating the request
  • http_req_connecting: The time taken to establish a TCP connection to the remote host
  • http_req_duration: The total time of the request. It equals http_req_sending + http_req_waiting + http_req_receiving important metrics
  • http_req_failed: Failed request rate
  • http_req_receiving: Time taken to receive response data from the remote host without initial DNS lookup/connection time
  • http_req_sending: The time it takes to send data to the remote host
  • http_req_tls_handshaking: The time it takes to establish a TLS session by shaking hands with the remote host
  • http_req_waiting: The time spent waiting for the remote host to respond
  • http_reqs: The total number of requests TPS
  • iteration_duration: The time it takes to complete a full iteration of the default/main function
  • iterations: The number of times a function in a script is executed
  • vus: The number of virtual users that are currently active
  • vus_max: The maximum number of virtual users
  • checks: The success rate of the checks item


The output results are supported: Amazon CloudWatch, Cloud, CSV, Datadog, Dynatrace, Elasticsearch, Grafana Cloud Prometheus, InfluxDB, JSON, Netdata, New Relic, Prometheus, TimescaleDB, StatsD, reference:The hyperlink login is visible.




Previous:.NET/C# uses the SM3 algorithm to generate signatures
Next:NVIDIA DGX Spark, the NVIDIA AI supercomputer, is accepting pre-orders
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com