From patchwork Fri Apr 30 21:20:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 96069 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3ULKhnS002734 for ; Fri, 30 Apr 2010 21:20:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759608Ab0D3VUl (ORCPT ); Fri, 30 Apr 2010 17:20:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31787 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759567Ab0D3VUk (ORCPT ); Fri, 30 Apr 2010 17:20:40 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3ULKeYi027844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Apr 2010 17:20:40 -0400 Received: from localhost.localdomain (vpn-9-198.rdu.redhat.com [10.11.9.198]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3ULKXD7008154; Fri, 30 Apr 2010 17:20:38 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH 2/2] IOzone test: Introduce additional results postprocessing Date: Fri, 30 Apr 2010 18:20:32 -0300 Message-Id: <1272662432-27875-2-git-send-email-lmr@redhat.com> In-Reply-To: <1272662432-27875-1-git-send-email-lmr@redhat.com> References: <1272662432-27875-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 30 Apr 2010 21:20:46 +0000 (UTC) diff --git a/client/tests/iozone/iozone.py b/client/tests/iozone/iozone.py index fa3fba4..4977b3c 100755 --- a/client/tests/iozone/iozone.py +++ b/client/tests/iozone/iozone.py @@ -1,5 +1,6 @@ import os, re from autotest_lib.client.bin import test, utils +import postprocessing class iozone(test.test): @@ -63,17 +64,19 @@ 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() + self.results_path = os.path.join(self.resultsdir, + 'raw_output_%s' % self.iteration) + self.analysisdir = os.path.join(self.resultsdir, + 'analysis_%s' % self.iteration) + + utils.open_write_close(self.results_path, self.results) def __get_section_name(self, desc): return desc.strip().replace(' ', '_') - def postprocess_iteration(self): + def generate_keyval(self): keylist = {} if self.auto_mode: @@ -150,3 +153,14 @@ class iozone(test.test): keylist[key_name] = result self.write_perf_keyval(keylist) + + + def postprocess_iteration(self): + self.generate_keyval() + a = postprocessing.IOzoneAnalyzer(list_files=[self.results_path], + output_dir=self.analysisdir) + a.analyze() + p = postprocessing.IOzonePlotter(results_file=self.results_path, + output_dir=self.analysisdir) + p.plot_all() +