-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to change how the UI is rendered #1376
Comments
My thoughts here are that, at the bare minimum, we should be able to control the following things through
Users should be able to get their progress in log form, and hide all non-log data (logo, Implementation-wise, I suggest these things should be configurable from a single CLI flag (or environment variable) and use It can look somewhat like this: k6 run --ui-mode "nologo,nodescription,progress=log,progress_freq=5s" script.js # suitable for CI runs
k6 run --ui-mode "progress=responsive-ascii,progres_freq=1s" script.js # long-running local run
K6_UI_MODE="nologo,progress=log" k6 run script.js # some dockerized environment
k6 cloud --ui-mode "progress=log" script.js
# ... Edit: forgot about terminal width.... Given the issues we've had recently (#1559, #1579), an option to specify term width will be useful for people running k6 on funky TTY-like terminals... |
Instinctively I'm not a big fan of the option grouping with strvals in this case, and would prefer separate options prefixed with Regarding terminals, if we want to be consistent with other tools, the standard approach is a |
Yeah, a flag for forcing k6 in interactive/non-interractive mode may also be very useful! Though k6 is different from docker and bash in that you don't really have to interact with scripts, i.e. you can't type things like how you can in docker. So, for the moment, whether we're on a TTY only controls how we display things like the progress bars and terminal colors, the same things that would be controlled via And I'm not completely discounting individual flags, they have their advantages, but they definitely also have their disadvantages... I wouldn't mind more individual flags, assuming we put them in
It's a jumbled mix of peripheral and formatting options, and script-affecting/HTTP options, and misc stuff, with no grouping and not a lot of consistency in naming them 😞 If we group things together and order this page somewhat, it wouldn't be all that opposed to discrete options for all things UI. Another reason for this approach, besides the simplicity of having each option affect just one thing, is that we already have a few discrete UI-related options: |
Just noting that we got a request, through Aha, for being able to optionally turn off the display of the logo: https://loadimpact.ideas.aha.io/ideas/LI-I-64 |
As evidenced by #1748, we probably need a way to tell k6 to use simplified (i.e. ASCII instead of UTF8) terminal UI and output characters. Some of those glitches could be masked if we just let users hide the logo + |
#2056 is potentially another reason for having an non-unicode (i.e. pure ASCII) mode of k6. Though I am not sure if utf is the case, maybe it's something else, terminal control codes or whatever, I don't have a way to test it so 🤷♂️ Having universal fallbacks for fancy features in general is probably a good idea when we can't detect feature support (to have the CLI equivalent of progressive enhancement 😅 )... |
Feature Description
In #1332 we experimented with a
--ui-mode
option to change how the progress bars were rendered, but after some discussion we agreed that it was best leaving that option (or a similarly named one) to change how the entire UI is rendered, and not just progress bars.Suggested Solution
One possible value could be
log
, where instead of showing progress bars, k6 would output log messages, which might be useful for headless/CI environments.A related option to this might be
--ui-refresh-rate
, which would control the update frequency (currently hard-coded to 100ms).The text was updated successfully, but these errors were encountered: