From owner-linux-raid-outgoing@vger.rutgers.edu Sun Mar 12 23:49:40 2000 Return-Path: Received: from nic.funet.fi (nic.funet.fi [193.166.0.145]) by planet.fef.com (8.9.3/8.9.3) with ESMTP id XAA30837 for ; Sun, 12 Mar 2000 23:49:39 -0800 Received: from vger.rutgers.edu ([128.6.190.2]:13598 "EHLO vger.rutgers.edu" ident: "NO-IDENT-SERVICE[2]" smtp-auth: TLS-CIPHER: ) by nic.funet.fi with ESMTP id ; Mon, 13 Mar 2000 09:50:27 +0200 Received: by vger.rutgers.edu via listexpand id ; Sun, 12 Mar 2000 22:37:48 -0500 Received: by vger.rutgers.edu id ; Sun, 12 Mar 2000 22:19:34 -0500 Received: from nina.pagesz.net ([208.194.157.3]:20452 "EHLO pagesz.net") by vger.rutgers.edu with ESMTP id ; Sun, 12 Mar 2000 22:00:27 -0500 Received: (from jmm@localhost) by pagesz.net (8.8.7/8.8.7) id CAA04465; Mon, 13 Mar 2000 02:04:31 -0500 Date: Mon, 13 Mar 2000 02:04:30 -0500 From: James Manning To: linux-raid@vger.rutgers.edu Cc: miku@iki.fi Subject: in search of good gnuplot output Message-ID: <20000313020430.A4168@nina.pagesz.net> Mail-Followup-To: linux-raid@vger.rutgers.edu, miku@iki.fi Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=Dxnq1zWXvFF0Q93v X-Mailer: Mutt 0.95.4us Sender: owner-linux-raid@vger.rutgers.edu Precedence: bulk X-Loop: majordomo@vger.rutgers.edu X-Orcpt: rfc822;linux-raid-outgoing Status: RO --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii As tiotest's funnyscripts/ directory is largely (if not wholly) out-dated and broken, I've tried a first-pass perl script replacement for makeimages.sh that takes the same params as the tiobench.pl perl script and makes a gnuplot output. Currently only plots the read performance (will be fairly easy to extend later)... it's currently intentionally fairly simple until output format(s) are stable. This is mainly to solicit input on what valuable gnuplot output could look like. I'm not against surface plots, but trying to figure out good x, y, and z variable selections for them hasn't been working well for me :) Example output from this command: funnyscripts/makeimages.pl --threads 1 --threads 2 --threads 4 --threads 6 --threads 8 --threads 10 --threads 12 --threads 16 --threads 20 --threads 24 --dir /tmp --dir /src is located here: http://sublogic.com/reads.png James --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="makeimages.pl" #!/usr/bin/perl -w # Author: James Manning # This software may be used and distributed according to the terms of # the GNU General Public License, http://www.gnu.org/copyleft/gpl.html # # Description: # Perl wrapper for calling tiobench.pl and displaying results # graphically using gnuplot use strict; my $args = join(" ",@ARGV); my %input_fields; my %output_fields; my %values_present; my %data; my $dir; my $size; my $blk; my $thr; my $read; my $read_cpu; my $field; my $write; my $write_cpu; my $seek; my $seek_cpu; open(TIO,"tiobench.pl $args 2> /dev/null |") or die "failed on tiobench"; while( !~ m/^---/) {} # get rid of header stuff while(my $line = ) { $line =~ s/^\s+//g; # remove any leading whitespace ($input_fields{'dir'}, $input_fields{'size'}, $input_fields{'blk'}, $input_fields{'thr'}, $output_fields{'read'}, $output_fields{'read_cpu'}, $output_fields{'write'}, $output_fields{'write_cpu'}, $output_fields{'seek'}, $output_fields{'seek_cpu'} ) = split(/[\s%]+/, $line); foreach $field (keys %input_fields) { # mark values that appear $values_present{$field}{$input_fields{$field}}=1; } foreach $field (keys %output_fields) { # mark values that appear $data{$input_fields{'dir'}}{$input_fields{'thr'}}{$field} =$output_fields{$field}; } } my $gnuplot_input = "\n". "set terminal png medium color;\n". "set output \"reads.png\";\n". "set title \"Reads\";\n". "set xlabel \"Threads\";\n". "set ylabel \"MB/s\";\n". "plot "; my @gnuplot_files; foreach my $dir (sort keys %{$values_present{'dir'}}) { my $file="read_dir=$dir"; $file =~ s#/#_#g; push(@gnuplot_files,"\"$file\" with lines"); open(FILE,"> $file") or die $file; foreach my $thr (sort {$a <=> $b} keys %{$values_present{'thr'}}) { print FILE "$thr $data{$dir}{$thr}{'read'}\n"; print "DEBUG: $thr $data{$dir}{$thr}{'read'}\n"; } close(FILE); } $gnuplot_input .= join(", ",@gnuplot_files) . ";\n"; print "DEBUG: feeding gnuplot $gnuplot_input"; open(GNUPLOT,"|gnuplot") or die "could not run gnuplot"; print GNUPLOT $gnuplot_input; close(GNUPLOT); --Dxnq1zWXvFF0Q93v--