Use this to simplify meta-commands in console, and to create a console_choose
command that prompts the user for a choice, and then executes a command with
variable substitution.
Also add a "raw" export format.
The Python and Locust exports are hard to maintain, their tests are extremely
brittle, they didn't have full test coverage, and are by my guess very rarely
used. I feel the Locust export should certainly be an externally maintained
addon. The Python/requests export can come back if someone cares enough, and it
can be structured in a way we can maintain.
This PR introduces the cuts addon, a flow dissector that allows you to select
and operate on specific components of flows. It also adds the first consumer
for cuts - the cuts.save command.
Save the content of the focus to /tmp/foo:
cuts.save s.content|@focus /tmp/foo
Save the URL and response content-type headers for all flows currently shown to
file, comma-separated, one flow per line:
cuts.save s.url,q.header[content-type]|@focus /tmp/foo
We also use this to replace the body save shortcut in the console flowlist.
- Add client.replay [flows], client.replay.stop
- Add server.replay [flows], server.replay.stop
- The corresponding options for file loading are only read on startup, further
changes are ignored. In interactive contexts, replay is started with the
commands, not through option changes.
- Deprecate flow.replay, use replay.client instead
This patch:
- Introduces a core update() event that should be invoked whenever flows are
changed outside of the normal lifecycle.
- Extend view.resolve to know about @all, which matches all flows in the view.
- Add a core flow.resume comand, which resumes flows and broadcasts an update event.
- Define flow list bindings for:
A -> flow.resume @all
a -> flow.resume @focus
d -> view.remove @focus
z -> view.remove @all
This has the same urgency as "info", but also signals to interactive tools that
the user's attention should be drawn to the output, even if they're not looking
at the event log. In the console app, this means the message appears in the
status bar with a timeout.
Our first user-facing command. The following commands do the obvious things:
save.file @marked /tmp/flows
save.file @focus /tmp/flows
save.file @hidden /tmp/flows
save.file "~m get" /tmp/flows
This is our first built-in command, which will be used by very many other
commands.
Also add a --commands option to dump all commands, analogous to --options.