Skip to content

Instantly share code, notes, and snippets.

View dgzlopes's full-sized avatar
:octocat:
Octocated

Daniel González Lopes dgzlopes

:octocat:
Octocated
View GitHub Profile
import { parseHTML } from 'k6/html';
import http from 'k6/http';
var PRODUCT = __ENV.PRODUCT || 'K6';
export default function () {
const res = http.get('https://grafana.com/docs/grafana-cloud/whats-new/#whats-new-in-grafana-cloud');
const doc = parseHTML(res.body);
const cards = doc.find('.whats-new-card').toArray();
export const parseResults = {
stacks: [],
reporterConfigs: [],
timezone: "America/New_York",
};
export const handleResults = {
eventsPerStack: {},
logs: [],
};
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"time"
collectorpb "go.opentelemetry.io/proto/otlp/collector/trace/v1"
import { sleep } from "k6";
import { openKv } from "k6/x/kv";
export const options = {
scenarios: {
poll: {
exec: "poll",
executor: "constant-vus",
vus: 1,
duration: "20s",
import { sleep } from "k6";
import { randomIntBetween } from 'https://jslib.k6.io/k6-utils/1.2.0/index.js';
import http from "k6/http";
import { setTimeout, clearTimeout } from "k6/experimental/timers";
export const options = {
stages: [
{ duration: '5s', target: 5 },
{ duration: '10s', target: 5 },
{ duration: '5s', target: 0 },
export const parseResults = {
stacks: [],
reporterConfigs: [],
timezone: "America/New_York",
};
export const handleResults = {
eventsPerStack: {},
logs: [],
};
export class Stack {
constructor(name, config) {
this.name = name;
this.config = config;
if (_isParse === true) {
parseOutput.stacks[this.name] = [];
parseOutput.stacks[this.name].push(this);
}
}
import { check } from 'k6';
import http from 'k6/http';
import { page } from 'k6/experimental/browser';
export const options = {
scenarios: {
browser: {
executor: 'constant-vus',
exec: 'browser',
vus: 1,
[
{
"name": "xk6-kafka",
"description": "Load-test Apache Kafka. Includes support for Avro messages",
"url": "https://github.com/mostafa/xk6-kafka",
"logo": "https://github.com/mostafa/xk6-kafka/blob/1259557afd378a5fe236e19c3d09bda401584ee6/assets/kafka-logo.png?raw=true",
"author": {
"name": "Mostafa Moradian",
"url": "https://github.com/mostafa"
},