Menu
DocumentationGrafana k6Testing guidesInjecting faults with xk6-disruptorxk6-disruptor APIServiceDisruptorConstructor
Open source
Constructor
The ServiceDisruptor()
constructor creates a new instance of a ServiceDisruptor class.
Parameter | Type | Description |
---|---|---|
service | string | name of the service |
namespace | string | namespace on which the service is defined |
options (optional) | object | options for controlling the behavior of the disruptor |
Options
The following options control the creation and behavior of the ServiceDisruptor
:
Attribute | Type | Description |
---|---|---|
injectTimeout | string | maximum time for waiting the disruptor to be ready in the target pods (default 30s) |
Example
JavaScript
const disruptor = new ServiceDisruptor('my-service', 'my-namespace');
Was this page helpful?
Related documentation
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Performance testing and observability in Grafana Cloud
In this webinar, learn how Grafana Cloud k6 offers you the best developer experience for performance testing.
User-centered observability: load testing, real user monitoring, and synthetics
Learn how to use load testing, synthetic monitoring, and real user monitoring (RUM) to understand end users' experience of your apps. Watch on demand.