Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
keep=false
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-k|--keep)
keep=true
@mstoykov
mstoykov / a.js
Last active August 28, 2019 08:00
tested example for issue k6/#707
import Class1 from './class1File.js';
import Class2 from './class2File.js';
export default {
Class1,
Class2
};
package main
import (
"regexp"
"testing"
"github.com/stretchr/testify/assert"
)
func A(name string) string {
package main
import (
"fmt"
"net/url"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
@mstoykov
mstoykov / app.bundle.js
Last active November 14, 2019 11:34
webpack transformed
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r
.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module
"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty
(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){
return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=require("k6/http")},function(
package main
import (
"fmt"
"math/rand"
"sort"
"strings"
"testing"
"time"
)
@mstoykov
mstoykov / gist:7c2192da1c732f2b802c3302aa9c2b5f
Last active May 13, 2020 08:29
rg 'logrus\.(Info|Warn|Error|Log|Print|Trace|With)\w*\('
cmd/root.go: logrus.WithError(err).Warn("could not get config directory")
cmd/run.go: logrus.WithError(err).Error("failed to create summary export file")
cmd/run.go: logrus.WithError(err).Error("failed to close summary export file")
cmd/run.go: logrus.WithError(err).Error("failed to make summary export file")
cmd/cloud.go: logrus.WithError(progressErr).Error("Test progress error")
cmd/cloud.go: logrus.WithField("sig", sig).Print("Exiting in response to signal...")
cmd/cloud.go: logrus.WithError(err).Error("Stop cloud test error")
stats/json/collector.go: logrus.WithField("filename", c.fname).WithError(err).Warning(
stats/json/collector.go: logrus.WithField("filename", c.fname).Debug("JSON: Writing JSON metrics")
stats/json/collector.go: logrus.WithField("filename", c.fname).WithError(err).Warning(
import http from 'k6/http';
import {check, group, sleep, fail} from 'k6';
export let options = {
scenarios:{
"vus_100": {
executor: "ramping-vus",
stages: [
{ target: 100, duration: '1m' },
{ target: 100, duration: '3m' },
{
"es.symbol": false,
"es.symbol.description": false,
"es.symbol.async-iterator": true,
"es.symbol.has-instance": true,
"es.symbol.is-concat-spreadable": true,
"es.symbol.iterator": true,
"es.symbol.match": true,
"es.symbol.match-all": false,
"es.symbol.replace": true,
@mstoykov
mstoykov / script.js
Created October 2, 2020 15:19
Testing ws memory leak k6
'use strict'
var ws = require("k6/ws")
var k6 = require("k6")
var check = k6.check
var sleep = k6.sleep
var Counter = require('k6/metrics').Counter
var FetchRecordsSuccessRate = new Counter('FetchRecords_SuccessRate');
var connections = new Counter('Client_Read_Connections');