From patchwork Wed Nov 11 06:58:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 11896533 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BF8DC4742C for ; Wed, 11 Nov 2020 07:05:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5817020786 for ; Wed, 11 Nov 2020 07:05:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="jxtu/Fm3"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cLxm3MQ/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726102AbgKKHFa (ORCPT ); Wed, 11 Nov 2020 02:05:30 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58017 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbgKKHF3 (ORCPT ); Wed, 11 Nov 2020 02:05:29 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A3B765C045A; Wed, 11 Nov 2020 02:05:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 11 Nov 2020 02:05:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=djaGuxkgg+HjAAejZhXsDZHi+6k xVQnPuRkraZYebvU=; b=jxtu/Fm3vaWDY+//Er49Yun/3NfjjwZrMkNXrlozFdQ 4ueu6lFNFWIHeT5FqZY4mg/pqxuEHB5VOwRJuaDGIWSQ2IvYFAJ0pOPTZbpH9Xhd QTK732wKKAtb4QJKP29KvT8r8IlaeqIfd3w9ztiU0TryhFfL0zXQHRQs3evUVSF8 ouueJbjUX7SrhAIe+9RGo7LkIw6nMQxNAw5UUbNcvu95j6e23Jzgr4H7Db0k6DEf ZjaMHPNviKesw48pvvO8PYXNEAa5wqp9dzeFZ6MMhNF87EgVL+XpE6Ot8IULpBuT sTWpgmlBsAJ7lRtoomUjc562CZTiXaELaalbVOog+/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=djaGux kgg+HjAAejZhXsDZHi+6kxVQnPuRkraZYebvU=; b=cLxm3MQ/UgtsFdbIolfGV7 zTuMgYR3bEtmLd35bKrIFzVcSzkx3TCitEDNTpn/1svcScXv4500zz96kvlTlZBw NwSq0vG+TXOgIZenz5h/DVCE2/6kOz4vpFvhcAELc/aqTzagLxQWqd4XaUz8/B/u ZOl69jsz8BbQiF56TI5vNVSlHKNNas3gi1YV03UAzvFMeJaLXcvy4ZdP4o/WhA40 30BtRkuhlrEKJENqpQJcz3WSWCMJ+rg149gEICOhmPEqamCVSW/6ahDCWZBoQtx5 otLHl+dI0ngYwPhFD8+q0ugr1zemL8D6uJYp5ySPpC5tmZrcwdxKMHiSbtI8+l3A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudduledgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecukfhppeekledrudegrdeivddrkeeknecuvehl uhhsthgvrhfuihiivgepfeenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrd himh X-ME-Proxy: Received: from vm-mail.pks.im (dynamic-089-014-062-088.89.14.pool.telefonica.de [89.14.62.88]) by mail.messagingengine.com (Postfix) with ESMTPA id E89D93280060; Wed, 11 Nov 2020 02:05:27 -0500 (EST) Received: from localhost (ncase [10.192.0.11]) by vm-mail.pks.im (OpenSMTPD) with ESMTPSA id 7f4edda6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 11 Nov 2020 06:58:47 +0000 (UTC) Date: Wed, 11 Nov 2020 07:58:47 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: peff@peff.net, gitster@pobox.com Subject: [PATCH v3 3/4] p1400: use `git-update-ref --stdin` to test multiple transactions Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In commit 0a0fbbe3ff (refs: remove lookup cache for reference-transaction hook, 2020-08-25), a new benchmark was added to p1400 which has the intention to exercise creation of multiple transactions in a single process. As git-update-ref wasn't yet able to create multiple transactions with a single run we instead used git-push. As its non-atomic version creates a transaction per reference update, this was the best approximation we could make at that point in time. Now that `git-update-ref --stdin` supports creation of multiple transactions, let's convert the benchmark to use that instead. It has less overhead and it's also a lot clearer what the actual intention is. Signed-off-by: Patrick Steinhardt --- t/perf/p1400-update-ref.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/t/perf/p1400-update-ref.sh b/t/perf/p1400-update-ref.sh index ce5ac3ed85..dda8a74866 100755 --- a/t/perf/p1400-update-ref.sh +++ b/t/perf/p1400-update-ref.sh @@ -7,13 +7,14 @@ test_description="Tests performance of update-ref" test_perf_fresh_repo test_expect_success "setup" ' - git init --bare target-repo.git && test_commit PRE && test_commit POST && - printf "create refs/heads/%d PRE\n" $(test_seq 1000) >create && - printf "update refs/heads/%d POST PRE\n" $(test_seq 1000) >update && - printf "delete refs/heads/%d POST\n" $(test_seq 1000) >delete && - git update-ref --stdin instructions ' test_perf "update-ref" ' @@ -26,14 +27,7 @@ test_perf "update-ref" ' ' test_perf "update-ref --stdin" ' - git update-ref --stdin /dev/null ' test_done