[Spice-devel] [server PATCH v2 0/3] replay: add count and skip

Uri Lublin uril at redhat.com
Sun Mar 6 12:25:04 UTC 2016


This patch-set touches only server/tests/replay utility.

It adds 2 commands and fixes an access to a NULL pointer.

With count and skip new commands, it's possible
to fast-forward the replay to an interesting point.

How to use it:
First run only with --count: spice-server-replay --count $spice-recorded-file
It counts the number of commands processed by spice-server.

Then run with skip and the number of commands to skip.
For example if there are 100000 commands one can skip to 50000
spice-server-replay --slow=1000 --skip=50000 <params> $spice-recorded-file

Note, that all commands are processed by spice-server, the "--skip"
only skips the sleep of "--slow".

v1->v2 : Made some changes according to Frediano's comments:
 - The number of commands is always counted, and --count only prints it.
   = variable name changed accordingly
   = skip logic is a bit simplified
 - Help string for count starts with a capital letter.
 - ++ncommands instead of ncommands++ (same in this scenario)


Uri Lublin (3):
  replay: learn how to count commands
  replay: learn how to skip the first N (slow) commands
  replay: do not use argv after g_option_context_parse

 server/tests/replay.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

-- 
2.5.0



More information about the Spice-devel mailing list