Comments on: A script snippet to relative-ize numbers embedded in text http://www.xaprb.com/blog/2009/09/01/a-script-snippet-to-relative-ize-numbers-embedded-in-text/ Stay curious! Thu, 02 May 2013 12:36:53 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Log Buffer #160: a Carnival of the Vanities for DBAs | Pythian Group Blog http://www.xaprb.com/blog/2009/09/01/a-script-snippet-to-relative-ize-numbers-embedded-in-text/#comment-16943 Log Buffer #160: a Carnival of the Vanities for DBAs | Pythian Group Blog Fri, 04 Sep 2009 16:59:54 +0000 http://www.xaprb.com/blog/?p=1269#comment-16943 [...] Schwartz, had a script snippet to relative-ize numbers embedded in text to [...]

]]>
By: Ronald Bradford http://www.xaprb.com/blog/2009/09/01/a-script-snippet-to-relative-ize-numbers-embedded-in-text/#comment-16939 Ronald Bradford Thu, 03 Sep 2009 23:36:21 +0000 http://www.xaprb.com/blog/?p=1269#comment-16939 @Ben

SHOW INNODB STATUS includes a date/time stamp, so if comparing two complete files, and then looking at these subset of lines, a time comparison is possible (but not trival with date/time in human format).

I’ve modified all my logging these days for key scripts to always include epoch_secs for this exact reason.

]]>
By: Xaprb http://www.xaprb.com/blog/2009/09/01/a-script-snippet-to-relative-ize-numbers-embedded-in-text/#comment-16938 Xaprb Thu, 03 Sep 2009 19:51:17 +0000 http://www.xaprb.com/blog/?p=1269#comment-16938 Mitch, right I had the same thought — we need to recognize floating-point numbers too.

]]>
By: Ben http://www.xaprb.com/blog/2009/09/01/a-script-snippet-to-relative-ize-numbers-embedded-in-text/#comment-16933 Ben Wed, 02 Sep 2009 22:24:12 +0000 http://www.xaprb.com/blog/?p=1269#comment-16933 @Ronald:

Interesting, maybe it could be made smart enough to recognize timestamps at the beginning of lines, and/or if the output of a command is being piped to it in real time it can time the arrival of each line.

That said, in the scenario described in the post, it’s almost certainly just reading from a static text file, so there’s no available source of timing information. And that’s probably be the most common use case for this tool.

]]>
By: Ronald Bradford http://www.xaprb.com/blog/2009/09/01/a-script-snippet-to-relative-ize-numbers-embedded-in-text/#comment-16932 Ronald Bradford Wed, 02 Sep 2009 21:28:08 +0000 http://www.xaprb.com/blog/?p=1269#comment-16932 I would also add to the script in this case an indication of the time interval between the two samples.

While that means the output changes, if you are looking at the 4 lines in isolation in your example, you don’t know if that’s a minute,hour,or day of processing.

]]>