[Swift-commit] r4345 - trunk/libexec/log-processing

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Tue Apr 12 14:31:50 CDT 2011


Author: wozniak
Date: 2011-04-12 14:31:49 -0500 (Tue, 12 Apr 2011)
New Revision: 4345

Added:
   trunk/libexec/log-processing/sec-to-hour.pl
   trunk/libexec/log-processing/sec-to-min.pl
Log:
Time scale conversion scripts


Added: trunk/libexec/log-processing/sec-to-hour.pl
===================================================================
--- trunk/libexec/log-processing/sec-to-hour.pl	                        (rev 0)
+++ trunk/libexec/log-processing/sec-to-hour.pl	2011-04-12 19:31:49 UTC (rev 4345)
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+# Convert the time unit from seconds to hours
+# INPUT:  A Swift log file with Unix time in the first columns
+#                  timestamp ... 
+#         where timestamp is a number
+# OUTPUT: The same log file with the timestamp divided by 3600
+
+$load = 0;
+
+
+while (<STDIN>) {
+    @tokens = split;
+    $tokens[0] /= 3600.0;
+    printf("@tokens\n");
+}


Property changes on: trunk/libexec/log-processing/sec-to-hour.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/libexec/log-processing/sec-to-min.pl
===================================================================
--- trunk/libexec/log-processing/sec-to-min.pl	                        (rev 0)
+++ trunk/libexec/log-processing/sec-to-min.pl	2011-04-12 19:31:49 UTC (rev 4345)
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+# Convert the time unit from seconds to minutes
+# INPUT:  A Swift log file with Unix time in the first columns
+#                  timestamp ... 
+#         where timestamp is a number
+# OUTPUT: The same log file with the timestamp divided by 60
+
+$load = 0;
+
+
+while (<STDIN>) {
+    @tokens = split;
+    $tokens[0] /= 60.0;
+    printf("@tokens\n");
+}


Property changes on: trunk/libexec/log-processing/sec-to-min.pl
___________________________________________________________________
Name: svn:executable
   + *




More information about the Swift-commit mailing list