On Wed, Apr 14, 2010 at 6:11 PM, Lucas Meneghel Rodrigues 
<[email protected]>wrote:

> Update iozone tarball to the latest iozone available.
> Also, make sure the raw iozone output gets recorded
> on a file per iteration. This way people with 3rd
> party postprocessing scripts can process figures
> from tests executed on autotest.
>
> The actual tarball change will happen on svn (binary
> patch not included).
>
> Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
> ---
>  client/tests/iozone/iozone.py |   38
> ++++++++++++++++++++++++++++++++++----
>  1 files changed, 34 insertions(+), 4 deletions(-)
>
> diff --git a/client/tests/iozone/iozone.py b/client/tests/iozone/iozone.py
> index 02f3413..fa3fba4 100755
> --- a/client/tests/iozone/iozone.py
> +++ b/client/tests/iozone/iozone.py
> @@ -1,17 +1,35 @@
> -#!/usr/bin/python
>  import os, re
>  from autotest_lib.client.bin import test, utils
>
>
>  class iozone(test.test):
> -    version = 2
> +    """
> +    This autotest module runs the IOzone filesystem benchmark. The
> benchmark
> +    generates and measures a variety of file operations. Iozone has been
> ported
> +    to many machines and runs under many operating systems.
> +
> +    Iozone is useful for performing a broad filesystem analysis of a
> vendor's
> +    computer platform. The benchmark tests file I/O performance for the
> +    following operations:
> +
> +    Read, write, re-read, re-write, read backwards, read strided, fread,
> fwrite,
> +    random read, pread ,mmap, aio_read, aio_write
> +
> +    @author: Ying Tao ([email protected])
> +    @see: http://www.iozone.org
> +    """
> +    version = 3
>
>     def initialize(self):
>         self.job.require_gcc()
>
>
> -    # http://www.iozone.org/src/current/iozone3_283.tar
> -    def setup(self, tarball='iozone3_283.tar'):
> +    def setup(self, tarball='iozone3_347.tar'):
> +        """
> +        Builds the given version of IOzone from a tarball.
> +        @param tarball: Tarball with IOzone
> +        @see: http://www.iozone.org/src/current/iozone3_347.tar
> +        """
>         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
>         utils.extract_tarball_to_dir(tarball, self.srcdir)
>         os.chdir(os.path.join(self.srcdir, 'src/current'))
> @@ -28,6 +46,13 @@ class iozone(test.test):
>
>
>     def run_once(self, dir=None, args=None):
> +        """
> +        Runs IOzone with appropriate parameters, record raw results in a
> per
> +        iteration raw output file as well as in the results attribute
> +
> +        @param dir: IOzone file generation dir.
> +        @param args: Arguments to the iozone program.
> +        """
>         if not dir:
>             dir = self.tmpdir
>         os.chdir(dir)
> @@ -38,6 +63,11 @@ class iozone(test.test):
>         self.results = utils.system_output('%s %s' % (cmd, args))
>         self.auto_mode = ("-a" in args)
>
> +        path = os.path.join(self.resultsdir, 'raw_output_%s' %
> self.iteration)
> +        raw_output_file = open(path, 'w')
> +        raw_output_file.write(self.results)
> +        raw_output_file.close()
> +
>
>
utils.open_write_close


>     def __get_section_name(self, desc):
>         return desc.strip().replace(' ', '_')
> --
> 1.6.6.1
>
> _______________________________________________
> Autotest mailing list
> [email protected]
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to