From patchwork Sun Jul 12 17:49:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Shinkevich X-Patchwork-Id: 1327580 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B4Z7F0Bjyz9sQt for ; Mon, 13 Jul 2020 03:50:15 +1000 (AEST) Received: from localhost ([::1]:45166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jug79-00039b-LY for incoming@patchwork.ozlabs.org; Sun, 12 Jul 2020 13:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jug6P-000396-Hn; Sun, 12 Jul 2020 13:49:25 -0400 Received: from relay.sw.ru ([185.231.240.75]:60384 helo=relay3.sw.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jug6N-0001lC-64; Sun, 12 Jul 2020 13:49:24 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay3.sw.ru with esmtp (Exim 4.93) (envelope-from ) id 1jug6B-0005LT-GL; Sun, 12 Jul 2020 20:49:11 +0300 From: Andrey Shinkevich To: qemu-block@nongnu.org Subject: [PATCH v4 0/3] scripts/simplebench: add bench_write_req.py test Date: Sun, 12 Jul 2020 20:49:15 +0300 Message-Id: <1594576158-75884-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 Received-SPF: pass client-ip=185.231.240.75; envelope-from=andrey.shinkevich@virtuozzo.com; helo=relay3.sw.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/12 13:17:17 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The script 'bench_write_req.py' allows comparing performances of write request for two qemu-img binary files. If you made a change in QEMU code and want to check the write requests performance, you will want to build two qemu-img binary files with and without your change. Then you specify paths to those binary files and put them as parameters to the bench_write_req.py script. You may see other supported parameters in the USAGE help. v4: 01: 'if/else requests' blocks moved from patch 0001 to 0003. v3: Based on the Vladimir's review 01: The test results were amended in the patch description. 02: The python format string syntax changed to the newer one f''. 03: The 'empty_disk' test parameter fixed to True. 04: The function bench_write_req() was supplied with commentary. 05: The subprocess.call() was replaced with subprocess.run(). 06: The exception handling was improved. 07: The v2 only patch was split into three in the series. Andrey Shinkevich (3): scripts/simplebench: compare write request performance scripts/simplebench: allow writing to non-empty image scripts/simplebench: add unaligned data case to bench_write_req scripts/simplebench/bench_write_req.py | 206 +++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100755 scripts/simplebench/bench_write_req.py