From patchwork Mon Oct 19 21:35:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Vandiver X-Patchwork-Id: 11845297 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 C13FBC433DF for ; Mon, 19 Oct 2020 21:35:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 644422231B for ; Mon, 19 Oct 2020 21:35:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z0DMK2IT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733226AbgJSVfU (ORCPT ); Mon, 19 Oct 2020 17:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733223AbgJSVfU (ORCPT ); Mon, 19 Oct 2020 17:35:20 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02ED5C0613D0 for ; Mon, 19 Oct 2020 14:35:20 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id h7so1353023wre.4 for ; Mon, 19 Oct 2020 14:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=0cKnq3ai3qJJvReanp+IwPBsXPj7SOWushngrvWxycE=; b=Z0DMK2IT+H8kgk6vx5yycdB0J68JdW8J0ixuUY1WsKXN67k6adA/NgKLXYOQ17sYvL FytoF3ecKRz6CHKmi8O9w1ROYY6cseQlThm6XADuZKekLGV8ul1UuUFC7fnbcoao9Fhs //D4RMcMAtzckEYMapKd99bAd9kAiP3+J9wke7A2yHHhBhyEBJ/tOqTWqDJfT1+xLNpd NRcvY26VMQWlXtBS2fcqbIpY25L5A+H/DZtXvtHCdCwl9x/3FkTNtCqcTHS7voQqyiQ4 H8QhzadkDQjeSzkWjFwPlcTyTdjypEmCSb2QUCnoIhLjJjPJBoYgXcqji/kKkSxtiE1j aOlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=0cKnq3ai3qJJvReanp+IwPBsXPj7SOWushngrvWxycE=; b=YTJeUb+oy4d2jRukQTVl/cDxka8DordtVB2z295+4cmvDjWIKz5es+gG1bWCPEKpoh 5XNp2WTc38sXNfGjYS0XEh0j77eMpZ66t7slgX/i3hTF0t8QDWqdEuxyw62sWfOt7xj9 omjtD4nfsvk9d09l9tDJ5zwsebwTQ/9XI5SZZt5rz1KVnRhWtLw82H2Zwj6QOQZbuxhz GVnZZxFTULpwBP/L8RuUW6bwPVtSLSimArr3eH+2RwJ0z0qIyiDfZm2k0bLK6PYL/N4L Z1AFAIKIGCdTL3SbWvmuOLREA0oGEOpXKX7d2si+Nv7BWrNGuaASmx3n/HYGvhl9LnWF PxRA== X-Gm-Message-State: AOAM531xoa2TAPlY3mC3zsCxN8oqLS5VcQPPK1UqsdZw4F66RqkjNPN5 TgIqZzXdsLK7fZrzNiroWYXvUkNdOCQ= X-Google-Smtp-Source: ABdhPJz5qYz2dsvBEFJl3tTEqESdaXsyWZEC0vmiFJCaXXZzCN3xBzA5pbxu3T5AgpOLnuNZHBd8NQ== X-Received: by 2002:adf:e88c:: with SMTP id d12mr1323760wrm.21.1603143318601; Mon, 19 Oct 2020 14:35:18 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f5sm1026424wmh.16.2020.10.19.14.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 14:35:17 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Mon, 19 Oct 2020 21:35:12 +0000 Subject: [PATCH v2 1/4] fsmonitor: use fsmonitor data in `git diff` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Utsav Shah , Nipunn Koorapati , Nipunn Koorapati , Taylor Blau , Nipunn Koorapati , Alex Vandiver Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Alex Vandiver From: Alex Vandiver With fsmonitor enabled, the first call to match_stat_with_submodule calls refresh_fsmonitor, incurring the overhead of reading the list of updated files -- but run_diff_files does not respect the CE_FSMONITOR_VALID flag. Make use of the fsmonitor extension to skip lstat() calls on files that fsmonitor judged as unmodified. Notably, this change improves performance of the git shell prompt when GIT_PS1_SHOWDIRTYSTATE is set. Signed-off-by: Alex Vandiver Signed-off-by: Nipunn Koorapati --- diff-lib.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index f95c6de75f..d2d31b9f82 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -97,6 +97,8 @@ int run_diff_files(struct rev_info *revs, unsigned int option) diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/"); + refresh_fsmonitor(istate); + if (diff_unmerged_stage < 0) diff_unmerged_stage = 2; entries = istate->cache_nr; @@ -197,8 +199,17 @@ int run_diff_files(struct rev_info *revs, unsigned int option) if (ce_uptodate(ce) || ce_skip_worktree(ce)) continue; - /* If CE_VALID is set, don't look at workdir for file removal */ - if (ce->ce_flags & CE_VALID) { + /* + * When CE_VALID is set (via "update-index --assume-unchanged" + * or via adding paths while core.ignorestat is set to true), + * the user has promised that the working tree file for that + * path will not be modified. When CE_FSMONITOR_VALID is true, + * the fsmonitor knows that the path hasn't been modified since + * we refreshed the cached stat information. In either case, + * we do not have to stat to see if the path has been removed + * or modified. + */ + if (ce->ce_flags & (CE_VALID | CE_FSMONITOR_VALID)) { changed = 0; newmode = ce->ce_mode; } else { From patchwork Mon Oct 19 22:47:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipunn Koorapati X-Patchwork-Id: 11845407 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 A7211C43457 for ; Mon, 19 Oct 2020 22:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D7B6221FC for ; Mon, 19 Oct 2020 22:47:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WX3UxumR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388634AbgJSWro (ORCPT ); Mon, 19 Oct 2020 18:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388622AbgJSWrn (ORCPT ); Mon, 19 Oct 2020 18:47:43 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9C3CC0613D0 for ; Mon, 19 Oct 2020 15:47:41 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id e17so1432852wru.12 for ; Mon, 19 Oct 2020 15:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=YDGjg72DiBHMJo7ao0V16mKGbZgzL/e6IJE1LLIK85I=; b=WX3UxumRfS/gdVd/zWfsms6HmKX1ORIt1XvRYBi8pGWNGCQhBNFJik4sJMeIpjnGR3 8Hu/PRIgC5OOc8WtRw0weVpK9CsSvDsGxGx71nzFviuk1+Kjifiy95WP+uu3zxdpvunV ULyFsOJ88xMiZgEhEqRyC7Q3xd+om6c1oTXPoEYF3h6zuVFxHDmRA2veWG2cN3cfjzfX VsViT0NO5iHXmo/G/cLcTRj55SA58rFGlTdsYLmVMEzfGZ0c1W1N3n+43cgKN35VKi9l ojKpT4/v7o5SQcbhumSv4cJuBPTBglYl2FFN7r+K6aUXrtqsVTJ9YmKJG7sOoRqJJNTg uu3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=YDGjg72DiBHMJo7ao0V16mKGbZgzL/e6IJE1LLIK85I=; b=W7bVJSYBMjUoFBdihcj7wozid9n/QDGhIi2LT/7hWJJ8Ue2jj5s89fVK0vQvXbI/S7 DZlgrjkQM5SEOF6dsmXYXEkw/k24Lmj1w5fH5L5n6Xj8ochDheRo2v4pmyW54zttWAv8 7+tnQzWjX+6w/DGQ2JnbawI66IgGWBIxnIjhEA/Bnx3MmO8aKayOtWDJpL4Fycw07sag /z7eT5tHZGE7W8JcvlNxoqfiCata8x1V3Eoxgf+fCyc5mBEzIaBgoAUpqQO6pXXQ0CM2 Dh+O/QqVTAulmSOFiYD+rlA8qNL5hzbigwYdEhLh2dUBkHtEy8fTFyvO20p8+l5bcRex u1hg== X-Gm-Message-State: AOAM532Xz8UceRhubC7CSX1DoKcnWmm2FuWgQS54hTf2w6fYOk+T6GX4 tFeR6CJ1mYcZH8B1TgPO+3G3dVN9bgU= X-Google-Smtp-Source: ABdhPJxR8AaFfiU4t+bN8t6dXTa3T8yHau/+xxViT3BhgqDxAkGAr2t+l+PGs4zt95geTXd6F00JXQ== X-Received: by 2002:a5d:49cc:: with SMTP id t12mr1690335wrs.342.1603147660369; Mon, 19 Oct 2020 15:47:40 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o5sm1491544wrw.76.2020.10.19.15.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 15:47:39 -0700 (PDT) Message-Id: <1c7876166f5d9262c44c9df0f613e7d0beb98722.1603147657.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 19 Oct 2020 22:47:32 +0000 Subject: [PATCH v3 2/7] t/perf/README: elaborate on output format Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Utsav Shah , Nipunn Koorapati , Nipunn Koorapati , Taylor Blau , Nipunn Koorapati , Nipunn Koorapati Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Nipunn Koorapati From: Nipunn Koorapati Signed-off-by: Nipunn Koorapati --- t/perf/README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/perf/README b/t/perf/README index bd649afa97..fb9127a66f 100644 --- a/t/perf/README +++ b/t/perf/README @@ -28,6 +28,8 @@ the tests on the current git repository. 7810.3: grep --cached, cheap regex 3.07(3.02+0.25) 7810.4: grep --cached, expensive regex 9.39(30.57+0.24) +Output format is in seconds "Elapsed(User + System)" + You can compare multiple repositories and even git revisions with the 'run' script: From patchwork Mon Oct 19 21:35:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipunn Koorapati X-Patchwork-Id: 11845303 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 C4313C43467 for ; Mon, 19 Oct 2020 21:35:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66CC422403 for ; Mon, 19 Oct 2020 21:35:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FeW0pb46" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733238AbgJSVfX (ORCPT ); Mon, 19 Oct 2020 17:35:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733236AbgJSVfW (ORCPT ); Mon, 19 Oct 2020 17:35:22 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A292DC0613CE for ; Mon, 19 Oct 2020 14:35:21 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id e2so984616wme.1 for ; Mon, 19 Oct 2020 14:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Djf3TWO3UFcf03qpN2acJDVn06wf04grB536pabMBck=; b=FeW0pb46Ntu0He48gfahPc8I8WnTtP5dJoERT1CaWDUc5z06tI3yjodet8gO8htbhP DAU6gLHYemBMG2Y5VEk6TzED7CqCoJvNClWtq71OVb4Y15fw8XNd68Witf47zCujHREH zMu5a1IxrJD64qjlimy8UrT4z8+5c9jNXDJWcVYl3JtTd3Mr82//Iw7gu4TSjx5kAyi3 J96+EaWHEwqIB7I4RtnIOHroFhWWWmEcKm+duQaejIjg7OGxjHTQvRcq984kpjPhP3M4 qmoU294OW/8RHWoG0BJEiN0ts0E1egnLJKPqZ9zW6FmybhQ5+DowzdGcyBp4KGMAEfvJ 023g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=Djf3TWO3UFcf03qpN2acJDVn06wf04grB536pabMBck=; b=NvzBBRX4wnYHCpd8SK34GHvIB7hA4BzOHGNzJGO98b3AJN6lEu0vNwUW4OcN80ZLuD KLnKlX8DbqCfYP+2paPbQqbM2j5ZpDMN2Nu2YDcXSwYxAZo/B68koZc0JERLhBWTar7B 1HjXp55iq954ozEKF4Pe8EXCx71/Gb9miITmPsY233wwBtdNWgquitEWKKD2SBrYNgjs MxilEkgjHqZLixanGtMCv1/4jewGVsSw1Sje5Fep0FmmwYQZYMZOTOjm/MJcy+1wXoKx /EzOfzR7TVMmyDclgjvF+mLwRoqP2H856WYukotEQNh4PSa8UCYAwrrry989A4wmg1gz Rbpg== X-Gm-Message-State: AOAM531kxFKxvCpt9SrxVH+3X0hkQnboDPtSklb60dhLzATlSt6udn/3 5kvfVturr5BC8QzWVLnOBgYAov38oP8= X-Google-Smtp-Source: ABdhPJxlMPPt78HIw1rvysv1iStjULZ8dae2r7YtKiOC6Y1xdvtuNaQN/FUH5dfuy+A/Juq/e9+4Pg== X-Received: by 2002:a1c:49c2:: with SMTP id w185mr1243970wma.70.1603143320226; Mon, 19 Oct 2020 14:35:20 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f14sm243203wrr.80.2020.10.19.14.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 14:35:19 -0700 (PDT) Message-Id: <401f696c8156acafd1bf91511fde7ae099ff9052.1603143316.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 19 Oct 2020 21:35:14 +0000 Subject: [PATCH v2 3/4] t/perf/p7519-fsmonitor.sh: warm cache on first git status Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Utsav Shah , Nipunn Koorapati , Nipunn Koorapati , Taylor Blau , Nipunn Koorapati , Nipunn Koorapati Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Nipunn Koorapati From: Nipunn Koorapati The first git status would be inflated due to warming of filesystem cache. This makes the results comparable. Before Test this tree -------------------------------------------------------------------------------- 7519.2: status (fsmonitor=.git/hooks/fsmonitor-watchman) 2.52(1.59+1.56) 7519.3: status -uno (fsmonitor=.git/hooks/fsmonitor-watchman) 0.18(0.12+0.06) 7519.4: status -uall (fsmonitor=.git/hooks/fsmonitor-watchman) 1.36(0.73+0.62) 7519.7: status (fsmonitor=) 0.69(0.52+0.90) 7519.8: status -uno (fsmonitor=) 0.37(0.28+0.81) 7519.9: status -uall (fsmonitor=) 1.53(0.93+1.32) After Test this tree -------------------------------------------------------------------------------- 7519.2: status (fsmonitor=.git/hooks/fsmonitor-watchman) 0.39(0.33+0.06) 7519.3: status -uno (fsmonitor=.git/hooks/fsmonitor-watchman) 0.17(0.13+0.05) 7519.4: status -uall (fsmonitor=.git/hooks/fsmonitor-watchman) 1.34(0.77+0.56) 7519.7: status (fsmonitor=) 0.70(0.53+0.90) 7519.8: status -uno (fsmonitor=) 0.37(0.32+0.78) 7519.9: status -uall (fsmonitor=) 1.55(1.01+1.25) Signed-off-by: Nipunn Koorapati --- t/perf/p7519-fsmonitor.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh index def7ecdbc7..9313d4a51d 100755 --- a/t/perf/p7519-fsmonitor.sh +++ b/t/perf/p7519-fsmonitor.sh @@ -114,7 +114,8 @@ test_expect_success "setup for fsmonitor" ' fi && git config core.fsmonitor "$INTEGRATION_SCRIPT" && - git update-index --fsmonitor + git update-index --fsmonitor && + git status # Warm caches ' if test -n "$GIT_PERF_7519_DROP_CACHE"; then From patchwork Mon Oct 19 21:35:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipunn Koorapati X-Patchwork-Id: 11845301 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 5EFD1C433E7 for ; Mon, 19 Oct 2020 21:35:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D4D32236F for ; Mon, 19 Oct 2020 21:35:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XRJ14p18" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733240AbgJSVf1 (ORCPT ); Mon, 19 Oct 2020 17:35:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733236AbgJSVfY (ORCPT ); Mon, 19 Oct 2020 17:35:24 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A1C3C0613CE for ; Mon, 19 Oct 2020 14:35:22 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id i1so1381516wro.1 for ; Mon, 19 Oct 2020 14:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=0RC6FzReFlf4yeIagkj7kLKIxl2O3bpWSofVrEiEpxw=; b=XRJ14p181LrbxqatFIdJyGz8UdgplJi1gPh7gMEDuFEkyl1BxLAJwgoHzmtrHEGivC 80hGMgyuoMsdcBNiJ8MrIDCa1Z5II7UFeHTyXM/Z7NR6Zuo8VyRxHQcAmuYRN1IMMwLv 7QO1uBrqwJvZofZawRJmJY5f/QFqMMBDBGxe5nfgWhbcZJi9Y/X11vQRtaq5Ya6kKBSY T67R+26cRdoATjqXh0OPTGeyU3Fpd5CpZ6+KSVzdPqc81+hnEf/vupfxEaybi62h6yhw kUKFXC8wZ0XvA5R2gUo+VldDkzsk86Y2LzxNTaXB5Y4kiEVn4VS1EODSXSWks27/IesW +r4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=0RC6FzReFlf4yeIagkj7kLKIxl2O3bpWSofVrEiEpxw=; b=OOi2tjjRZT2t0xBDZJmNjbueQtEk3ncoIpKG4pY6zcx1k0CFyI2mSlbHcQTYZmhBl5 1Zylz+F2FN+hhFWMLX2o88proIteJis/LguOVzDTkQPs9nQvrbydYvl7D3tlcdWf7RRc QMDru6Mto0v0bkOJIgqYOehQn3nMcSagTr13rkVOfwfiV72ILD6yxGJvxuLt39dEg8pn 4AQhCM+uRuHchYYTpp34oF+sncqC/pqdcvhnePwhPSZyiaSKPPpHNQ1N1KNIx4QfNrSp 91crBU5Ddbw46cTvsyzRmbmYYTeE8NJ7U+DMRgDVflppSHt55z1WVYNJqcIjgw9Lbb4E A3jg== X-Gm-Message-State: AOAM532bSJVvtMVOWNrpBRfIvfkmlWnew4fXBs6lRtjBsSZUO5b7OnPt dWHD6Ym6z5I0e2kyAeaqcLM9wYfhFjQ= X-Google-Smtp-Source: ABdhPJyghJJdr4X5W/cH5LeY7DGTe3L6cTEAxPZ8jZRZz/PHXiTn1bq6s+hSsBCeeg1NO/pR3cgLig== X-Received: by 2002:a5d:4051:: with SMTP id w17mr1354000wrp.24.1603143321141; Mon, 19 Oct 2020 14:35:21 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id b5sm1177868wrs.97.2020.10.19.14.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 14:35:20 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Mon, 19 Oct 2020 21:35:15 +0000 Subject: [PATCH v2 4/4] t/perf: add fsmonitor perf test for git diff Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Utsav Shah , Nipunn Koorapati , Nipunn Koorapati , Taylor Blau , Nipunn Koorapati , Nipunn Koorapati Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Nipunn Koorapati From: Nipunn Koorapati Results for the git-diff fsmonitor optimization in patch in the parent-rev (using a 400k file repo to test) As you can see here - git diff with fsmonitor running is significantly better with this patch series (80% faster on my workload)! GIT_PERF_LARGE_REPO=~/src/server ./run v2.29.0-rc1 . -- p7519-fsmonitor.sh Test v2.29.0-rc1 this tree ----------------------------------------------------------------------------------------------------------------- 7519.2: status (fsmonitor=.git/hooks/fsmonitor-watchman) 1.46(0.82+0.64) 1.47(0.83+0.62) +0.7% 7519.3: status -uno (fsmonitor=.git/hooks/fsmonitor-watchman) 0.16(0.12+0.04) 0.17(0.12+0.05) +6.3% 7519.4: status -uall (fsmonitor=.git/hooks/fsmonitor-watchman) 1.36(0.73+0.62) 1.37(0.76+0.60) +0.7% 7519.5: diff (fsmonitor=.git/hooks/fsmonitor-watchman) 0.85(0.22+0.63) 0.14(0.10+0.05) -83.5% 7519.6: diff -- 0_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.08+0.05) 0.13(0.11+0.02) +8.3% 7519.7: diff -- 10_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.08+0.04) 0.13(0.09+0.04) +8.3% 7519.8: diff -- 100_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.07+0.05) 0.13(0.07+0.06) +8.3% 7519.9: diff -- 1000_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.09+0.04) 0.13(0.08+0.05) +8.3% 7519.10: diff -- 10000_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.14(0.09+0.05) 0.13(0.10+0.03) -7.1% 7519.12: status (fsmonitor=) 1.67(0.93+1.49) 1.67(0.99+1.42) +0.0% 7519.13: status -uno (fsmonitor=) 0.37(0.30+0.82) 0.37(0.33+0.79) +0.0% 7519.14: status -uall (fsmonitor=) 1.58(0.97+1.35) 1.57(0.86+1.45) -0.6% 7519.15: diff (fsmonitor=) 0.34(0.28+0.83) 0.34(0.27+0.83) +0.0% 7519.16: diff -- 0_files (fsmonitor=) 0.09(0.06+0.04) 0.09(0.08+0.02) +0.0% 7519.17: diff -- 10_files (fsmonitor=) 0.09(0.07+0.03) 0.09(0.06+0.05) +0.0% 7519.18: diff -- 100_files (fsmonitor=) 0.09(0.06+0.04) 0.09(0.06+0.04) +0.0% 7519.19: diff -- 1000_files (fsmonitor=) 0.09(0.06+0.04) 0.09(0.05+0.05) +0.0% 7519.20: diff -- 10000_files (fsmonitor=) 0.10(0.08+0.04) 0.10(0.06+0.05) +0.0% I also added a benchmark for a tiny git diff workload w/ a pathspec. I see an approximately .02 second overhead added w/ and w/o fsmonitor From looking at these results, I suspected that refresh_fsmonitor is already happening during git diff - independent of this patch series' optimization. Confirmed that suspicion by breaking on refresh_fsmonitor. (gdb) bt [simplified] 0 refresh_fsmonitor at fsmonitor.c:176 1 ie_match_stat at read-cache.c:375 2 match_stat_with_submodule at diff-lib.c:237 4 builtin_diff_files at builtin/diff.c:260 5 cmd_diff at builtin/diff.c:541 6 run_builtin at git.c:450 7 handle_builtin at git.c:700 8 run_argv at git.c:767 9 cmd_main at git.c:898 10 main at common-main.c:52 Signed-off-by: Nipunn Koorapati --- t/perf/p7519-fsmonitor.sh | 71 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh index 9313d4a51d..2b4803707f 100755 --- a/t/perf/p7519-fsmonitor.sh +++ b/t/perf/p7519-fsmonitor.sh @@ -115,6 +115,13 @@ test_expect_success "setup for fsmonitor" ' git config core.fsmonitor "$INTEGRATION_SCRIPT" && git update-index --fsmonitor && + mkdir 1_file 10_files 100_files 1000_files 10000_files && + for i in `seq 1 10`; do touch 10_files/$i; done && + for i in `seq 1 100`; do touch 100_files/$i; done && + for i in `seq 1 1000`; do touch 1000_files/$i; done && + for i in `seq 1 10000`; do touch 10000_files/$i; done && + git add 1_file 10_files 100_files 1000_files 10000_files && + git commit -m "Add files" && git status # Warm caches ' @@ -142,6 +149,38 @@ test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" ' git status -uall ' +if test -n "$GIT_PERF_7519_DROP_CACHE"; then + test-tool drop-caches +fi + +test_perf "diff (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff +' + +if test -n "$GIT_PERF_7519_DROP_CACHE"; then + test-tool drop-caches +fi + +test_perf "diff -- 0_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 1_file +' + +test_perf "diff -- 10_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 10_files +' + +test_perf "diff -- 100_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 100_files +' + +test_perf "diff -- 1000_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 1000_files +' + +test_perf "diff -- 10000_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 10000_files +' + test_expect_success "setup without fsmonitor" ' unset INTEGRATION_SCRIPT && git config --unset core.fsmonitor && @@ -172,6 +211,38 @@ test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" ' git status -uall ' +if test -n "$GIT_PERF_7519_DROP_CACHE"; then + test-tool drop-caches +fi + +test_perf "diff (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff +' + +if test -n "$GIT_PERF_7519_DROP_CACHE"; then + test-tool drop-caches +fi + +test_perf "diff -- 0_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 1_file +' + +test_perf "diff -- 10_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 10_files +' + +test_perf "diff -- 100_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 100_files +' + +test_perf "diff -- 1000_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 1000_files +' + +test_perf "diff -- 10000_files (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff -- 10000_files +' + if test_have_prereq WATCHMAN then watchman watch-del "$GIT_WORK_TREE" >/dev/null 2>&1 && From patchwork Mon Oct 19 22:47:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipunn Koorapati X-Patchwork-Id: 11845413 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 52B6EC433E7 for ; Mon, 19 Oct 2020 22:47:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D11E221FC for ; Mon, 19 Oct 2020 22:47:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jxW+AF9g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388643AbgJSWrr (ORCPT ); Mon, 19 Oct 2020 18:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388622AbgJSWro (ORCPT ); Mon, 19 Oct 2020 18:47:44 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFCCC0613D0 for ; Mon, 19 Oct 2020 15:47:44 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id i1so1526495wro.1 for ; Mon, 19 Oct 2020 15:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=4whkkzAcsD6AS56O5NC31PASZfujLSOt9YgYJW3lzEs=; b=jxW+AF9gbmAQGVlz655y27og0+zhbRh4E6dAb7rlfXWnI9OmplvxfOVXeQsXzoJlK/ R6vV9RDTq3ohKURIxgVPtf55P2Q5/2bxFJJdiZ5n8iO5FxwDnY0t7yJ2YQP6Wh7h8HnS 2NEG1u0cPisAbPUEmjF4/ksWz9h+57Qeww9DjRU0X8Y5yZjzJy0Gq3EybQoH3O9Yyctn QxKN5TXMrPEVysdDIdakuh+ud3eiB3tYbK95Zrin9k2jKVQJuOsAx3EMy2mR38xuT3kU B7LPj3Igo5hLuboNGI/eZ2yW9becV3f+LULyIQt/Ho25YG4SU2SAMlMRNss9CZvXSnxr dS0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=4whkkzAcsD6AS56O5NC31PASZfujLSOt9YgYJW3lzEs=; b=VgQjfv6XiZJkC8hZBFl3fKLe1ASiUl9p7Jc8amV3B00/EHx1dkhHy6EnjQv7eQ8GtY qWSoD7SnYYNxKX8agmxTmWRcWqBUp2V732IuzSF9w3E677AnHRuV/brdwyClNCYfcY3Q p+mbLnlq89VX4wOw8TTn92HL+LVU3QRQmeWjn2hKhUN/w884p9PV1alRJJnwJOhII/wz i7APQ+vvUxaHkB4Wd4PL89qSiBkSSxk61vKJb9T/PrBbYkXJ5wbrZiF+tQ3QvdPsqbkw Gcy4zQFEsp6FLl9WoNv+wAixbk7lzQexaJaoAdfpu4GyhUL1txV9jpvSLCHNYfDRHhb1 fsYg== X-Gm-Message-State: AOAM533dgKoM6mdYGPQCxcELyEqnWNea/W6trYj9u4JeKgNcoRVEb7Uc TYlOGi4MFamNXlnTTkpM/gN3t/qix18= X-Google-Smtp-Source: ABdhPJxN7XyEvE+Dn8GX+PBVLXAhVu08btn4JB9r1PIy9fF9UG5MlFlcZYuby4E8PBis2tg85mxbOQ== X-Received: by 2002:adf:f88a:: with SMTP id u10mr1577669wrp.1.1603147662633; Mon, 19 Oct 2020 15:47:42 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z64sm63739wmg.19.2020.10.19.15.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 15:47:42 -0700 (PDT) Message-Id: <28c1e488bf644786af071e66b73450baa47ccc44.1603147657.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 19 Oct 2020 22:47:35 +0000 Subject: [PATCH v3 5/7] perf lint: check test-lint-shell-syntax in perf tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Utsav Shah , Nipunn Koorapati , Nipunn Koorapati , Taylor Blau , Nipunn Koorapati , Nipunn Koorapati Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Nipunn Koorapati From: Nipunn Koorapati Perf tests have some seq instead of test_seq. This runs the existing tests on the perf tests as well. Signed-off-by: Nipunn Koorapati --- t/Makefile | 3 ++- t/perf/p3400-rebase.sh | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/t/Makefile b/t/Makefile index c83fd18861..74b53af2bd 100644 --- a/t/Makefile +++ b/t/Makefile @@ -34,6 +34,7 @@ CHAINLINTTMP_SQ = $(subst ','\'',$(CHAINLINTTMP)) T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh)) THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh))) +TPERF = $(sort $(wildcard perf/p[0-9][0-9][0-9][0-9]-*.sh)) CHAINLINTTESTS = $(sort $(patsubst chainlint/%.test,%,$(wildcard chainlint/*.test))) CHAINLINT = sed -f chainlint.sed @@ -91,7 +92,7 @@ test-lint-executable: echo >&2 "non-executable tests:" $$bad; exit 1; } test-lint-shell-syntax: - @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS) + @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS) $(TPERF) test-lint-filenames: @# We do *not* pass a glob to ls-files but use grep instead, to catch diff --git a/t/perf/p3400-rebase.sh b/t/perf/p3400-rebase.sh index d202aaed06..7a0bb29448 100755 --- a/t/perf/p3400-rebase.sh +++ b/t/perf/p3400-rebase.sh @@ -9,16 +9,16 @@ test_expect_success 'setup rebasing on top of a lot of changes' ' git checkout -f -B base && git checkout -B to-rebase && git checkout -B upstream && - for i in $(seq 100) + for i in $(test_seq 100) do # simulate huge diffs echo change$i >unrelated-file$i && - seq 1000 >>unrelated-file$i && + test_seq 1000 >>unrelated-file$i && git add unrelated-file$i && test_tick && git commit -m commit$i unrelated-file$i && echo change$i >unrelated-file$i && - seq 1000 | tac >>unrelated-file$i && + test_seq 1000 | tac >>unrelated-file$i && git add unrelated-file$i && test_tick && git commit -m commit$i-reverse unrelated-file$i || From patchwork Mon Oct 19 22:47:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipunn Koorapati X-Patchwork-Id: 11845415 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 65538C43457 for ; Mon, 19 Oct 2020 22:47:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C18E223FD for ; Mon, 19 Oct 2020 22:47:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F0t6iqBF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388646AbgJSWrs (ORCPT ); Mon, 19 Oct 2020 18:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388641AbgJSWrr (ORCPT ); Mon, 19 Oct 2020 18:47:47 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A7F4C0613CE for ; Mon, 19 Oct 2020 15:47:45 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id j7so1456491wrt.9 for ; Mon, 19 Oct 2020 15:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=hXKOoN1rTfmjYc9bEHjZ5Kz6Fx+nBTv+DEl06unKn/Q=; b=F0t6iqBFTrLbKVvlduHiLRl5BBsjaZWJvFmtdFGTzvqiCKmJR64neIIPBpSadZgfTA BKb+BFoIfaFpAYOiTGLNti8LlGMMZtg5zeMfFygZXwKTWq9BGGvvlfTaqoBbCB7Jqg0Q JppU2OkA7UffAO5ad5MKdFpWJ1/6acyfGlOLFWNyK6fiw+N4Xrpuqc0XYcZGamqaXgy1 2pIWj+RHgjpmbyoFv+UGQ5bRA3gSu0ztd/tIpCBJJkS/u9yhfMgdWMr47pShocLXE6LC 5u9rLY/QnB0Ii+r90/l95ef429pUu+apLOr5dc7yzpCLLTcxuB1n4P3HWNhCgl1xwMS1 fJPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=hXKOoN1rTfmjYc9bEHjZ5Kz6Fx+nBTv+DEl06unKn/Q=; b=KaBF+EJrH7Wlm6pLKbFCyatuwQJsDJpDZBDHnKkQONs8WPTbgq4AGmMKyC/G4mjKmS RCAbHFbaog4f0xrIlWkFuMWW+dmGkkheISkOqd291AV1o38oW99GlgOYo4uMVvLVHQjE TMKCUmzNMURVvHaoh5vH3RMPb4BpeTxaao7H0jfXrhwiVeD3+WkDkyIm3A9CiHjH0sPv U1lMwymEP7Frno3f1AGofkbthIgixMTyklnulPDIpLFGO9xwbMFUZoKfhW8W4xdFV1EQ 65vc/3dciIrfkNoKxu8cI7LwIANAF7fBD0eWv2rLq4L4zB04JvhVQcuh6gxHG8YOYILT 6Vww== X-Gm-Message-State: AOAM532OaZme+k7a/CzwhVYadIFqSq4cX6r6nLKXoguMsrTVdTFCgnor yRollQe91Od7uLzZRVs01vGEYx24A+w= X-Google-Smtp-Source: ABdhPJzrho1pDfZizysPH+BdYzfjQLQx/KCiEljc5Ap6FqSW8gXqEiFQsse8Q07YvBsN7jA2QShzJA== X-Received: by 2002:a5d:4e48:: with SMTP id r8mr1500679wrt.141.1603147664134; Mon, 19 Oct 2020 15:47:44 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l5sm1564741wrq.14.2020.10.19.15.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 15:47:43 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Mon, 19 Oct 2020 22:47:37 +0000 Subject: [PATCH v3 7/7] p7519-fsmonitor: add a git add benchmark Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Derrick Stolee , Utsav Shah , Nipunn Koorapati , Nipunn Koorapati , Taylor Blau , Nipunn Koorapati , Nipunn Koorapati Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Nipunn Koorapati From: Nipunn Koorapati Test v2.29.0-rc1 this tree ----------------------------------------------------------------------------------------------------------------- 7519.2: status (fsmonitor=.git/hooks/fsmonitor-watchman) 1.48(0.79+0.67) 1.48(0.79+0.67) +0.0% 7519.3: status -uno (fsmonitor=.git/hooks/fsmonitor-watchman) 0.16(0.11+0.05) 0.17(0.13+0.04) +6.3% 7519.4: status -uall (fsmonitor=.git/hooks/fsmonitor-watchman) 1.36(0.77+0.58) 1.37(0.72+0.63) +0.7% 7519.5: diff (fsmonitor=.git/hooks/fsmonitor-watchman) 0.84(0.21+0.63) 0.14(0.11+0.03) -83.3% 7519.6: diff -- 0_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.07+0.05) 0.13(0.09+0.04) +8.3% 7519.7: diff -- 10_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.09+0.04) 0.13(0.07+0.06) +8.3% 7519.8: diff -- 100_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.08+0.05) 0.12(0.08+0.05) +0.0% 7519.9: diff -- 1000_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.12(0.08+0.05) 0.13(0.09+0.04) +8.3% 7519.10: diff -- 10000_files (fsmonitor=.git/hooks/fsmonitor-watchman) 0.14(0.08+0.06) 0.13(0.07+0.06) -7.1% 7519.11: add (fsmonitor=.git/hooks/fsmonitor-watchman) 2.75(1.41+1.27) 2.03(1.26+0.70) -26.2% 7519.13: status (fsmonitor=) 1.38(1.03+1.04) 1.37(1.04+1.04) -0.7% 7519.14: status -uno (fsmonitor=) 1.11(0.83+0.98) 1.10(0.89+0.90) -0.9% 7519.15: status -uall (fsmonitor=) 2.30(1.57+1.42) 2.31(1.49+1.50) +0.4% 7519.16: diff (fsmonitor=) 1.43(1.13+1.76) 1.46(1.19+1.72) +2.1% 7519.17: diff -- 0_files (fsmonitor=) 0.10(0.08+0.04) 0.11(0.08+0.04) +10.0% 7519.18: diff -- 10_files (fsmonitor=) 0.10(0.07+0.05) 0.11(0.08+0.04) +10.0% 7519.19: diff -- 100_files (fsmonitor=) 0.10(0.07+0.04) 0.11(0.07+0.05) +10.0% 7519.20: diff -- 1000_files (fsmonitor=) 0.10(0.08+0.03) 0.11(0.08+0.04) +10.0% 7519.21: diff -- 10000_files (fsmonitor=) 0.11(0.08+0.05) 0.12(0.07+0.06) +9.1% 7519.22: add (fsmonitor=) 2.26(1.46+1.49) 2.27(1.42+1.55) +0.4% Signed-off-by: Nipunn Koorapati --- t/perf/p7519-fsmonitor.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh index 75a0cef01d..fb20fe0937 100755 --- a/t/perf/p7519-fsmonitor.sh +++ b/t/perf/p7519-fsmonitor.sh @@ -169,6 +169,10 @@ test_fsmonitor_suite() { test_perf_w_drop_caches "diff -- 10000_files (fsmonitor=$INTEGRATION_SCRIPT)" ' git diff -- 10000_files ' + + test_perf_w_drop_caches "add (fsmonitor=$INTEGRATION_SCRIPT)" ' + git add --all + ' } test_fsmonitor_suite