]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
ts-bench-hostcmp-post: add plotting facilities benchmarking-with-osstest
authorDario Faggioli <raistlin@linux.it>
Tue, 9 Dec 2014 14:06:41 +0000 (15:06 +0100)
committerDario Faggioli <raistlin@linux.it>
Wed, 10 Dec 2014 16:58:19 +0000 (17:58 +0100)
in order to have an additional graph, comparing host and
guests performance when running kernbench.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest/Benchmarking.pm
ts-bench-hostcmp-post
ts-kernbench-reslts

index 301af081bebf75b35e454810b4c65b7da1d3ac5a..1be9c97baf25d9d81c8451c8abb0a81c6571dc66 100644 (file)
@@ -175,7 +175,9 @@ sub kernbench_print_results ($$) {
 }
 
 sub kernbench_plot_results ($$$) {
-  my ($dataf,$num_cols,$pfile)= @_;
+  my ($dfiles,$num_cols,$pfile)= @_;
+  my $f= keys @$dfiles;
+  my $s= join(' ',@$dfiles);
 
   my $h= new IO::File "> $pfile.gp" or die "$!";
   print $h <<EOF;
@@ -184,12 +186,19 @@ set output '$pfile.png'
 set title 'Kernbench Results for $flight.$job'
 $common_plot_opts
 set bmargin 6
+NDATA=$num_cols
+NHOSTS=$f
 SKIP_COL=1
-NCOL=$num_cols
+NCOL=1*(NHOSTS*NDATA)
 HWIDTH=1.0/(NCOL+1.0)
 cols=''
-plot for [c=SKIP_COL+1:SKIP_COL+NCOL] '$dataf' using c:xtic(1) with histograms title columnhead, \\
-        for [c=SKIP_COL+1:SKIP_COL+NCOL] '' every ::1 using 0:c:c with labels notitle offset first -HWIDTH*(NCOL/2.0)+HWIDTH/2.0+(c-(SKIP_COL+1))*HWIDTH, character 2 rotate by 90
+do for [h=0:NHOSTS-1] {
+        do for [c=1+h*(NDATA+SKIP_COL)+SKIP_COL:1+h*(NDATA+SKIP_COL)+SKIP_COL+NDATA-1] {
+          cols = cols . sprintf("\%d ", c);
+        }
+}
+plot for [c in cols] '< paste $s' using int(c):xtic(1) with histograms title columnhead, \\
+        for [i=1:words(cols)] '' every ::1 using 0:int(word(cols,i)):int(word(cols,i)) with labels notitle offset first -HWIDTH*(NCOL/2.0)+HWIDTH/2.0+(i-1)*HWIDTH, character 2 rotate by 90
 EOF
   close($h);
 
index 383bac01be51ae8dd92c6976ec9b8856c11abd0d..ee9cf0a33e90936b7ec14560e3c9da94fe77eefb 100755 (executable)
@@ -65,6 +65,7 @@ sub plot_hostcmp () {
     close FH;
   }
   unixbench_plot_results(\@dfiles,$ncols,"$stash/$job-PLOT") if $bn eq "unixbench";
+  kernbench_plot_results(\@dfiles,$ncols,"$stash/$job-PLOT") if $bn eq "kernbench";
 }
 
 sub resetboot () {
index 113a4ce51d1ecfe19bd40fe623122f4630a12360..b9ee3937079529d00c0082422e221fd1b0d7af89 100755 (executable)
@@ -62,13 +62,13 @@ sub fetch() {
 
 sub process () {
   my $resf= "$stash/$gho->{Name}--$lresfile";
-  my $dataf= "$resf-DATA";
+  my @dataf= "$resf-DATA";
   my $plotf= "$resf-PLOT";
 
   kernbench_process_results(\$results,$resf);
-  kernbench_print_results($results,$dataf);
+  kernbench_print_results($results,$dataf[0]);
   my $ncols= keys $results->{'Elapsed Time'}{'Result'};
-  kernbench_plot_results($dataf,$ncols,$plotf);
+  kernbench_plot_results(\@dataf,$ncols,$plotf);
 }
 
 fetch();