I would like to display groups alphabetically in the summary. Is it possible? Thanks.
Tami (Masaaki) Takamiya
Hi @tamitakamiya,
Currently - no.
I took a quick glance and it seems that they will more or less be in the order they appear in the script. To be honest I find this to be more useful then being alphabetical.
But in the case of multiple branches in the default
function the current behavior probably wonβt be nearly as useful as I find it for non multiple branches β¦
Although again I find the groups being alphabetical probably not what I would expect, it will be more consistent then the current behavior, and maybe it is the better behavior.
cc @ned @imiric
When I executed the following code:
import { group } from "k6";
function test(i) { group(`test ${i}`, () => { subTest(i); } ); }
function subTest(i) { group(`subtest ${i}`, () => {}); }
export default function() { for (let i = 1; i <= 10; i++ ) { test(i); } }
I got the following result. Results are different at each run. So I guessed those groups are stored in unordered collection such as set.
$ k6 run groups.js
/\ |βΎβΎ| /βΎβΎ/ /βΎ/
/\ / \ | |_/ / / /
/ \/ \ | | / βΎβΎ\
/ \ | |βΎ\ \ | (_) |
/ __________ \ |__| \__\ \___/ .io
execution: local
output: -
script: groups.js
duration: -, iterations: 1
vus: 1, max: 1
done [==========================================================] 1 / 1
β test 7
β subtest 7
β test 8
β subtest 8
β test 10
β subtest 10
β test 1
β subtest 1
β test 4
β subtest 4
β test 5
β subtest 5
β test 9
β subtest 9
β test 2
β subtest 2
β test 3
β subtest 3
β test 6
β subtest 6
Tami (Masaaki) Takamiya
Ah, I was also under the impression that groups were ordered, so I consider this a bugβ¦ Iβll create an issue