[Orca-checkins] r521 - orca/trunk/data_gatherers/winallator

blair at orcaware.com blair at orcaware.com
Thu Dec 29 20:01:20 PST 2005


Author: blair at orcaware.com
Date: Thu Dec 29 20:00:46 2005
New Revision: 521

Added:
   orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r520.txt
      - copied, changed from r520, /orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r519.txt
Removed:
   orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r519.txt
Modified:
   orca/trunk/data_gatherers/winallator/README

Log:
Clean up and simplify Winallator's patch for SourceFile.pm.  Also,
move some changes to another portion of the file so that it doesn't
include the $Revision$ svn:keywords expansion which would prevent it
from cleanly applying after the next commit to SourceFile.pm.

* data_gatherers/winallator/SourceFile.pm-patch-with-r520.txt:
  Renamed from
    data_gatherers/winallator/SourceFile.pm-patch-with-r519.txt.
  Regenerated by applying SourceFile.pm-patch-with-r519.txt to
    SourceFile.pm and running diff with the unpatched and patched
    versions.

* data_gatherers/winallator/README:
  Mention new filenames.


Modified: orca/trunk/data_gatherers/winallator/README
==============================================================================
--- orca/trunk/data_gatherers/winallator/README	(original)
+++ orca/trunk/data_gatherers/winallator/README	Thu Dec 29 20:00:46 2005
@@ -26,7 +26,7 @@
     a) Get a copy of the Orca source tree on the system that will
        process the Winallator log files.
 
-    b) Find the SourceFile.pm-patch-with-r519.txt file and note where
+    b) Find the SourceFile.pm-patch-with-r520.txt file and note where
        it is.
 
     c) cd into the $prefix/lib/Orca directory, where $prefix is where
@@ -35,7 +35,7 @@
     c) Apply the patch by running:
 
        cp -p SourceFile.pm SourceFile.FCS
-       patch -s -p0 < path/to/SourceFile.pm-patch-with-r519.txt
+       patch -s -p0 < path/to/SourceFile.pm-patch-with-r520.txt
 
  4. You have two choices now.  The first and easy choice is to load in
     a previously designed log configuration.  You can always modify

Copied: orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r520.txt (from r520, /orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r519.txt)
==============================================================================
--- /orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r519.txt	(original)
+++ orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r520.txt	Thu Dec 29 20:00:46 2005
@@ -1,24 +1,20 @@
---- SourceFile.pm.orig	2005-12-27 23:14:54.000000000 -0800
-+++ SourceFile.pm	2005-12-27 23:14:58.000000000 -0800
-@@ -48,6 +48,10 @@
- use Orca::Utils         qw(email_message);
- use vars                qw(@ISA $VERSION);
- 
-+# Andy Fox - 2nd July 2002
-+# We need this to convert time into Unix Epoch Time.
+--- SourceFile.pm.orig	2005-12-28 19:51:32.000000000 -0800
++++ SourceFile.pm	2005-12-28 20:04:16.000000000 -0800
+@@ -31,6 +31,7 @@
+ use Carp;
+ use Digest::MD5         qw(md5);
+ use Storable            qw(dclone);
 +use Time::Local;
-+
- @ISA     = qw(Orca::DataFile);
- $VERSION = (substr q$Revision: 513 $, 10)/100.0;
- 
-@@ -170,9 +174,39 @@
+ use Orca::Constants     qw($opt_verbose
+                            die_when_called
+                            $INCORRECT_NUMBER_OF_ARGS);
+@@ -170,9 +171,33 @@
        return unless $fd;
        my $line = <$fd>;
        chomp($line);
 +
-+      # Andy Fox - 2nd July 2002
-+      # Take the first line (headers) and convert it into a format Orca can understand
-+
++      # Take the first line (headers) and convert it into a format
++      # Orca can understand.
        if ($line) {
          $self->[I_FIRST_LINE] = 1;
 -        @column_description = split(' ', $line);
@@ -39,94 +35,47 @@
 +        $line = $_;
 +        print "$line\n";
 +
-+        # Andy Fox - 2nd July 2002
-+        # Changed this to a tab (was a space), so it can read tsv format files
-+
-+        @column_description = split('	', $line);
++        # Change this space to a tab, so it can read tsv format files.
++        @column_description = split("\t", $line);
 +
-+        # Andy Fox - 2nd July 2002
 +        # Set the first field of the first line 'timestamp'
-+
-+        $column_description[0]="timestamp";
-+
++        $column_description[0] = "timestamp";
        } else {
          warn "$0: warning: no first_line for '$filename' yet.\n";
          $open_file_cache->close($fid) or
-@@ -965,7 +999,18 @@
+@@ -965,7 +990,12 @@
      # in the output file when it starts up.
      next if $line =~ /timestamp/;
  
 -    my @line = split(' ', $line);
-+print "$line\n";
-+$_ = $line;
-+s/ /:/g;
-+s/"//g;
-+$line = $_;
-+
-+    # Andy Fox - 2nd July 2002
-+    # Changed this to a tab (was a space), so it can read tsv format files
-+    my @line = split('	', $line);
++    print "$line\n";
++    $line =~ s/ /:/g;
++    $line =~ s/"//g;
 +
-+    ##ANDY##
-+    #print "@line\n";
++    # Change this space to a tab, so it can read tsv format files.
++    my @line = split("\t", $line);
  
      # Skip this input line if 1) the file uses the first line to
      # define the column names, 2) the number of columns loaded is not
-@@ -984,6 +1029,58 @@
+@@ -984,6 +1014,22 @@
      } else {
        $time = $line[$date_column_index];
      }
-+#ANDY#
-+#print "$time\n";
 +
-+# At this stage the date is in this format: 06/18/2002 21:56:06.096
++    # At this stage the date is in this format: 06/18/2002:21:56:06.096
++    $time =~ s/\//:/g;
++    $time =~ s/\./:/;
++
++    # Now we have this: "06:18:2002:21:56:06:096"
++    my @time = split(':', $time);
++
++    my ($mon, $day, $yr, $hr, $min, $sec) = @time;
 +
-+$_ = $time;
-+s/\//:/g;
-+#print "$_\n";
-+#s/ /:/;
-+#print "$_\n";
-+s/\./:/;
-+#print "$_\n";
-+#$newtime = $_;
-+#s/"//g;
-+#print "$_\n";
-+
-+# Now we have this: "06:18:2002:21:56:06:096"
-+
-+my @andy = split(':', $_);
-+
-+my ($sec);
-+my ($min);
-+my ($hr);
-+my ($day);
-+my ($mon);
-+my ($yr);
-+
-+$mon = $andy[0];
-+$day = $andy[1];
-+$yr = $andy[2];
-+$hr = $andy[3];
-+$min = $andy[4];
-+$sec = $andy[5];
-+
-+#print "mon = $mon\n";
-+#print "day = $day\n";
-+#print "yr = $yr\n";
-+#print "hr = $hr\n";
-+#print "min = $min\n";
-+#print "sec = $sec\n";
-+
-+$mon -= 1;
-+$yr -= 1900;
-+#print "yr = $yr\n";
-+
-+my ($blur);
-+$blur = timelocal($sec, $min, $hr, $day, $mon, $yr);
-+#print "time is now $blur\n";
++    $mon -= 1;
++    $yr -= 1900;
 +
-+$time = $blur;
-+print "$time\n";
++    $time = timelocal($sec, $min, $hr, $day, $mon, $yr);
++    print "$time\n";
 +
      $last_data_time = $time if $time > $last_data_time;
  



More information about the Orca-checkins mailing list