janritter / k6-duration-extractor

Tool to extract the duration information per request from the K6 csv output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

K6 duration extractor

CircleCI Maintainability Test Coverage

Tool to extract the duration information per request from the K6 csv output

Prerequisites

  • Golang >= 1.16.6

Installation

Clone git repo

git clone git@github.com:janritter/k6-duration-extractor.git

Open project directory

cd k6-duration-extractor

Install via go

go install

Installation via Homebrew (For Mac / Linux)

Get the formula

brew tap janritter/k6-duration-extractor https://github.com/janritter/k6-duration-extractor

Install formula

brew install k6-duration-extractor

Usage

Execute your K6 test with CSV output

k6 run --out csv=result.csv script.js

Run the k6-duration-extractor for the result.csv K6 output file

k6-duration-extractor result.csv

The k6-duration-extractor will save each request duration in a CSV file called <your-k6-output-filename>-extracted.csv

In our case this is result-extracted.csv

Result example

timestamp,duration,check,error_message,error_code,group,method,name,proto,scenario,status,subproto,tls_version,url,extra_tags
1595325560,221.899000,,,,,GET,http://test.k6.io,HTTP/1.1,default,200,,,http://test.k6.io,
1595325560,221.899000,,,,,GET,http://test.k6.io,HTTP/1.1,default,200,,,http://test.k6.io,
1595325560,221.899000,,,,,GET,http://test.k6.io,HTTP/1.1,default,200,,,http://test.k6.io,
1595325560,221.899000,,,,,GET,http://test.k6.io,HTTP/1.1,default,200,,,http://test.k6.io,
1595325560,221.899000,,,,,GET,http://test.k6.io,HTTP/1.1,default,200,,,http://test.k6.io,

License and Author

Author: Jan Ritter

License: MIT

About

Tool to extract the duration information per request from the K6 csv output

License:MIT License


Languages

Language:Go 76.6%Language:Ruby 19.1%Language:Makefile 4.4%