From 0d5b3599dcdccce050aea944853002c121cfcb3f Mon Sep 17 00:00:00 2001 From: sageweil Date: Mon, 10 Sep 2007 04:43:08 +0000 Subject: [PATCH] git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1808 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/script/plot.pl | 9 +++++---- trunk/ceph/script/smooth.pl | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/trunk/ceph/script/plot.pl b/trunk/ceph/script/plot.pl index 775807ac2a8d4..2d4e3002bbd4d 100755 --- a/trunk/ceph/script/plot.pl +++ b/trunk/ceph/script/plot.pl @@ -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) { diff --git a/trunk/ceph/script/smooth.pl b/trunk/ceph/script/smooth.pl index cb369a9b681be..6cfbaf60ff921 100755 --- a/trunk/ceph/script/smooth.pl +++ b/trunk/ceph/script/smooth.pl @@ -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) { -- 2.39.5