You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this script, one custom trend, wsw_time, disappears from the console output when I use the handleSummary with the textSummary from the jslib.
Strangely, I think it didn't happen every time, either. Sorry I can't confirm that it's only occasionally reproducible, but I can attach a screenshot of a time it didn't appear.
import http from "k6/http";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";
import { Trend } from "k6/metrics";
const myTrend = new Trend("wsw_time");
const theirTrend = new Trend("their_time");
export default function () {
const getRes = http.get("http://httpbin.test.k6.io/");
theirTrend.add(getRes.timings.duration);
const resWSW = http.get("https://wellshapedwords.com/");
myTrend.add(resWSW.timings.duration);
}
export function handleSummary(data) {
return {
stdout: textSummary(data, { indent: "→", enableColors: true }),
};
}
Not that the other custom metric, their_time shows up fine in both cases.
k6 version
k6 v0.44.0 ((devel), go1.20.3, linux/amd64)
OS
Arch linux, installed through AUR
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Run script attached
Expected behaviour
wsw_time summary appears in handleSummary terminal output.
Actual behaviour
wsw_time doesn't appear.
The text was updated successfully, but these errors were encountered:
MattDodsonEnglish
changed the title
Custom trend disappears from handlesummary output to console.
Custom trend disappears from console output with handleSummary + textSummary
Apr 27, 2023
The in k6 implementation does by default add a bunch of new lines. And I feel like that should just not be needed. As without them parts of the end summary got eaten up by other parts that are written over.
I don't know if this was done due to some kind of deficiency that we intend on fixing or what.
No, the newlines definitely were not there to avoid overwriting by the progress bars, they were added to make the JS summary output identical to the old k6 Go code that produced the same summary.
The problem probably occurs because we use terminal control codes to control the terminal "cursor" (caret?) and essentially print the progressbars in the same place. I might have messed up something in #2815 that caused the last progressbar printing to overwrite the last line of the end-of-test summary 🤔 Or this bug might have existed before even that.
In either case, we should probably finish with the progress bars before we handle the end-of-test summary, which should resolve this bug too 🤔
Brief summary
In this script, one custom trend,
wsw_time
, disappears from the console output when I use thehandleSummary
with thetextSummary
from the jslib.Strangely, I think it didn't happen every time, either. Sorry I can't confirm that it's only occasionally reproducible, but I can attach a screenshot of a time it didn't appear.
Not that the other custom metric,
their_time
shows up fine in both cases.k6 version
k6 v0.44.0 ((devel), go1.20.3, linux/amd64)
OS
Arch linux, installed through AUR
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Run script attached
Expected behaviour
wsw_time
summary appears in handleSummary terminal output.Actual behaviour
wsw_time
doesn't appear.The text was updated successfully, but these errors were encountered: