Re: [Patch] script: Implement --ts-output and --ts-script options. -v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 10, 2009 at 03:20:13PM -0500, Robin Holt wrote:
> > > >  Do we really need --ts-script? I think the timing file (script -t)
> > > >  already includes all necessary information and everything what you
> > > >  need is to modify scriptreplay(1) to re-count and print timing
> > > >  information per line.
> > > 
> > > It is extremely convenient to have the timing information included in
> > 
> >  OK, I agree that it makes sense to store all information to the
> >  typescript file (but the old format has to be supported too).
> 
> The old format was the timing information to stderr which you needed to
> capture to a file.  Adding an option for specifying the replay timing
> file instead of just stderr might be nice, but I think we need to keep
> stderr as the expected location for a -t without this new option.

 Yes, we have to be backwardly compatible.

> Having the replay timing information in a separate file keeps you from
> having to somehow escape the demarkation characters.  For computer

 Good point, but this is not a problem.

> readable format, it is fairly efficient.  Again, addressing changes to
> how the replay data is captured seems like an issue separate from this.

 This is not separate issue, we already have all necessary timing
 information (well, now in separate file) -- it seems like nonsense to
 duplicate this stuff and introduce a new timing data.

> This timing information is for a different purpose, specifically to track
> how many seconds each line of output took relative to either start of script or
> the previous end of line.

 Again, I'm looking for a generic solution rather than for a solution
 how to resolve your and only your issue.

 For example from your point of view is important to track delay
 between lines, but for someone else could be interesting to track
 delay between prompts ($PS1), ... etc.

 It shouldn't be a problem to generate output with per-line timing
 information by scriptreplay(1).

  scriptreplay --print-timing --timing-separator='\n' <typescript>

 .. or so.

> >  We can extend the current typescript format, but it would be nice to
> >  provide the same quality of timing information that we have currently
> >  in the separate timing file -- it means time-per-bytes rather than
> >  time-per-line. 
> > 
> >  The scriptreplay(1) should be also updated to understand the new
> >  format.
> 
> It does.  At each point where we have put the formatted timestamp
> into the script file, I have added 29 bytes to the byte count for that
> printouts timing.  The result is a scriptreplay which works as well as
> before this change.

 I know, I read your patch.

> If you don't want them, it is easy enough for me to resubmit with them

 Ignore po/*. Please.

> With LANG=en_US, script --help:
> usage: script [-a] [-c <command>] [-f] [-q] [-t] [--ts-output] [--ts-script] [-T] [file]
> 
> With LANG=zh_CN, script --help:
> usage: script [-a] [-f] [-q] [-t] [file]
> 
> NOTE: This is not a new problem we are creating, Look at the po/pt_BR.po
> and you will see the -t option is already missing from that usage output.

 That's translators' responsibility to maintain .po files.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux