Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

artillery-plugin-ensure

Package Overview
Dependencies
Maintainers
1
Versions
343
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artillery-plugin-ensure

With this plugin Artillery can validate if a metric meets a predefined threshold or condition. You can create simple checks, e.g. that `p95` response time is <250ms, or more complex conditions which are based on several metrics.

  • 1.15.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
80K
increased by23.19%
Maintainers
1
Weekly downloads
 
Created
Source

Metric / SLO checks with Artillery

With this plugin Artillery can validate if a metric meets a predefined threshold or condition. You can create simple checks, e.g. that p95 response time is <250ms, or more complex conditions which are based on several metrics.

If an ensure check fails Artillery will exit with a non-zero exit code. This is useful in CI/CD pipelines for automatic quality checks and as a way to check that SLOs are met.

Docs: https://www.artillery.io/docs/reference/extensions/ensure

Example

In the following example, we set three ensure checks:

  1. The first one checks that HTTP response time p95 is <= 1000ms, with a threshold check
  2. The second one uses a more complex conditional expression, and checks that HTTP response time p99 is less than 2000ms and that at least 10 virtual users were launched
  3. The third check makes sure that all virtual user scenarios completed successfully
config:
  target: "https://www.artillery.io"
  plugins:
    ensure: {}
  phases:
    - duration: 10
      arrivalRate: 1
  ensure:
    thresholds:
      - engine.http.response_time.p95: 1000
    conditions:
      - expression: engine.http.response_time.p99 < 2000 and core.vusers.created.total > 10
        strict: false
      - expression: core.vusers.failed == 0
scenarios:
  - flow:
      - get:
          url: "/"
      - get:
          url: "/docs"
      - get:
          url: "/integrations"

License

MPL 2.0

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc