From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 09/27] ts-unixbench-reslts: process and plot bench results Date: Thu, 11 Dec 2014 14:11:44 +0100 Message-ID: <1418303504.31647.98.camel@Abyss.station> References: <20141210180651.26400.13356.stgit@Abyss.station> <20141210181006.26400.25863.stgit@Abyss.station> <20141211121554.GI21659@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7963812080128913436==" Return-path: In-Reply-To: <20141211121554.GI21659@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Ian Jackson , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============7963812080128913436== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-3aJ4Q1Khld+MiGoxl9KG" --=-3aJ4Q1Khld+MiGoxl9KG Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2014-12-11 at 12:15 +0000, Wei Liu wrote: > On Wed, Dec 10, 2014 at 07:10:06PM +0100, Dario Faggioli wrote: > > This is done in a new Osstest/Benchmarking.pm module, as > > the functions introduced may turn out useful somewhere else > > too. > >=20 >=20 > I would suggest using a dedicated commit for the introduction of > Benchmarking.pm. >=20 I'm not sure. I like it being introduced here where it's useful, since that does not, IMO, make the patch too long or to difficult to understand/review/etc. However, this is not a too big deal... let's see what others think, and I'll copy. :-) > > --- /dev/null > > +++ b/Osstest/Benchmarking.pm > > @@ -0,0 +1,115 @@ > > +# This is part of "osstest", an automated testing framework for Xen. > > +# Copyright (C) 2009-2013 Citrix Inc. >=20 > 2009-2014 >=20 Right! :-) > > +sub unixbench_plot_results ($$$) { > > + my ($dataf,$num_cols,$pfile)=3D @_; > > + my $h=3D new IO::File "> $pfile.gp" or die "$!"; > > + > > + printf $h < > +set terminal png enhanced font "/usr/share/fonts/truetype/ttf-dejavu/D= ejaVuSans.ttf" 8 size 800,600 > > +set output '$pfile.png' > > +set title 'Unixbench INDEXes for $flight.$job' > > +set key outside center top horizontal noreverse noenhanced autotitles = nobox > > +set xtics mirror rotate by -45 out > > +set style data histogram > > +set style histogram cluster gap 1 > > +set style fill solid border lt -1 > > +set boxwidth 1 absolute > > +set bmargin 13 > > +set rmargin 14 > > +SKIP_COL=3D1 > > +NCOL=3D$num_cols > > +HWIDTH=3D1.0/(NCOL+1.0) > > +plot for [c=3DSKIP_COL+1:SKIP_COL+NCOL] '$dataf' using c:xtic(1) with = histograms title columnhead, \\ > > + for [c=3DSKIP_COL+1:SKIP_COL+NCOL]'' every ::1 using 0:c:c wit= h labels notitle offset first -HWIDTH*(NCOL/2.0)+HWIDTH/2.0+(c-(SKIP_COL+1)= )*HWIDTH, character 2 rotate by 90 > > +EOF > > + close($h); > > + > > + my $gp=3D can_run('gnuplot') or return; >=20 > Need to install gnuplot before hand? >=20 Well, this is the OSSTest controller, not the target host, guest or anything, so I'd need to install it by some perl equivalent of 'system("apt-get install gnuplot") (or whatever Perl offers to run system commands). I haven't found many examples of executing commands on the controller in current OSSTest codebase, and I'm not sure whether that is a good idea and/or a strong requirement here... Again, let's see what others think. > > + my ($ok,$err)=3D run( command =3D> "$gp $pfile.gp", verbose =3D> 1 )= ; > > + logm("WARNING: plotting file with \"$err\"") unless $ok; >=20 > Fail the test case instead of issuing a warning? >=20 You think? Well, the benchmark(s) did run, and produced results that we can analyze in many way other than plotting, either inside OSSTest (adding the logic for that, of course) or outside of it, so I wouldn't call this a 'failure'. Perhaps I should distinguish between the cases where gnuplot is just not there, in which case I really would continue just issuing warnings, from the case where the plotting command ran and failed, in which cased I agree, we should fail the test... What do you think? Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-3aJ4Q1Khld+MiGoxl9KG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlSJmBAACgkQk4XaBE3IOsTvdACghU+akBam0CvGla/YoKJhYWMy tWcAn3JI3KCyyKdveMYmb+FKTVyR//rr =hVxp -----END PGP SIGNATURE----- --=-3aJ4Q1Khld+MiGoxl9KG-- --===============7963812080128913436== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7963812080128913436==--