This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: parse_tcpdump_log.pl: Use relative timestamps
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Tue Mar 8 22:47:38 2011 -0300

Instead of use absolute timestamps, use timestamps relative to the
first package.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 contrib/parse_tcpdump_log.pl |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=781efb26531a1d03b73ee4383e5a94af933c1d23

diff --git a/contrib/parse_tcpdump_log.pl b/contrib/parse_tcpdump_log.pl
old mode 100755
new mode 100644
index 8cc791c..56882c1
--- a/contrib/parse_tcpdump_log.pl
+++ b/contrib/parse_tcpdump_log.pl
@@ -28,12 +28,17 @@ sub print_frame($$)
        my %req = %{ @_[0] };
        my %resp = %{ @_[1] };
 
+       if (!$initial_time) {
+               $initial_time = $req{"Time"};
+               $last_time = $initial_time;
+       }
+
        # Print timestamps:
        #       relative time from resp 1
        #       relative time from last resp
        #       time to complete
        printf "%09d ms %06d ms (%06d us",
-               1000 * $req{"Time"} + 0.5,
+               1000 * ($req{"Time"} - $initial_time) + 0.5,
                1000 * ($req{"Time"} - $last_time) + 0.5,
                ($resp{"Time"} - $req{"Time"}) * 1000000 + 0.5;
        $last_time = $req{"Time"};
@@ -82,8 +87,6 @@ sub print_frame($$)
 sub process_frame($) {
        my %frame = %{ @_[0] };
 
-       $initial_time = $frame{"Arrival"} if (!$initial_time);
-
        if ($debug > 1) {
                my ($key, $value);
                print "\t\tRAW: $key => $value\n" while (($key, $value) = 
each(%frame));

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to