]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1808 29311d96-e01e-0410-9327-a35deaa...
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 10 Sep 2007 04:43:08 +0000 (04:43 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 10 Sep 2007 04:43:08 +0000 (04:43 +0000)
trunk/ceph/script/plot.pl
trunk/ceph/script/smooth.pl

index 775807ac2a8d48ffb195d1351699ab1ca56d36a1..2d4e3002bbd4d7600044bf43c5dbdcf8f87dc0d2 100755 (executable)
@@ -3,14 +3,15 @@
 use strict;
 
 my $dir = shift @ARGV;
-my $type = shift @ARGV;
+my ($type,$subtype) = split(/\./, shift @ARGV);
+$subtype = '.' . $subtype if $subtype;
 
 # list files
 my @files;
 my %fields;
-for my $f (`ls $dir/$type*`) {
+for my $f (`ls $dir/$type*$subtype`) {
     chomp $f;
-    next unless $f =~ /$type(\d+)$/;
+    next unless $f =~ /$type(\d+)$subtype$/;
     push(@files, $f);
     unless (%fields) {
        open(I,$f);
@@ -33,7 +34,7 @@ for my $f (`ls $dir/$type*`) {
 my $var = shift @ARGV;
 my $rest = join(' ', @ARGV);
 
-print "set style data lines\n";
+print "set style data lines\nset grid\n";
 print "set title \"$dir .. $var\"\n";
 if (scalar(@files) > 30) { print "set key off\n"; }
 #for my $var (@ARGV) {
index cb369a9b681befeee1cc8701e1924a0089dd50dd..6cfbaf60ff921d797478ae46f369d6872f7a411e 100755 (executable)
@@ -7,7 +7,11 @@ while (<>) {
     chomp;
     my @l = split(/\t/,$_);
     my $t = shift @l;
-    $v{$t} = \@l;
+    if (int $t) {
+       $v{$t} = \@l;
+    } else {
+       print "$_\n";
+    }
 }
 
 for my $t (sort {$a <=> $b} keys %v) {